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
}

ParameterTypeDescription
accountId
Required
NumberYour VWO application's Account ID.
sdkKey
Required
StringUnique environment key provided to you inside the Websites & Apps section in VWO application, under "Default Project".
gatewayServiceUrl
Required
StringURL 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.


What’s Next