Initialization
Before you can use the FME Go SDK, you need to initialize it with your account settings.
Basic Usage
Here's how to initialize the FME Go SDK:
import vwo "github.com/wingify/vwo-fme-go-sdk"
func main() {
options := map[string]interface{}{
"sdkKey": "your_sdk_key",
"accountId": "your_account_id",
"gatewayServiceURL": "http://your.gateway.service:port",
}
instance, err := vwo.Init(options)
if err != nil {
// Handle initialization error
panic(err)
}
// Use the instance for further operations
}
Parameter | Type | Description |
---|---|---|
accountId Required | Number | Your VWO application's Account ID. |
sdkKey Required | String | Unique environment key provided to you inside the Websites & Apps section in VWO application, under "Default Project". |
gatewayServiceUrl Required | String | URL of your Gateway Service. |
Please note that all three parameters are mandatory for initializing the Go SDK. Make sure you have set up the Gateway Service before initializing the SDK. For more information on the Gateway Service, refer to our Gateway Service documentation.
After successful initialization, you can use the instance to access all SDK functionalities.
Updated 2 months ago
What’s Next