All notable changes to this project will be documented in this file.
- Added
GetActiveFeatures
method. It retrieves information about the active feature flags that are available for a specific visitor code. This method replaces the deprecatedGetActiveFeatureListForVisitor
method.
- The SDK no longer logs failed tracking requests to the Data API when the user agent is identified as a bot (i.e., when the status code is 403).
- New targeting conditions are now available (some of them may require
GetRemoteVisitorData
pre-loaded data)- Browser Cookie
- Operating System
- IP Geolocation
- Kameleoon Segment
- Target Feature Flag
- Previous Page
- Number of Page Views
- Time since First Visit
- Time since Last Visit
- Number of Visits Today
- Total Number of Visits
- New or Returning Visitor
- Likelihood to convert
- New Kameleoon Data types were introduced:
- Stability and performance improvements
- Added support for additional Data API servers across the world for even faster network requests.
- Increased limit for requests to Data API: rate limits
- Added
GetVisitorWarehouseAudience
method to retrieve all data associated with a visitor's warehouse audiences and adds it to the visitor.
- Stability and performance improvements
- Stability and performance improvements
- Stability and performance improvements
- Increased the minimum required version of the Go language to 1.18.
- Renamed
Client
toKameleoonClient
- Removed
NewClient
function. Instead, useKameleoonClientFactory
- Removed
RunWhenReady
method. Instead, useWaitInit
- Changed
Config
:- Renamed
Config
toKameleoonClientConfig
- Changed the default request timeout to
10
seconds - Renamed the
Timeout
andtimeout
configuration fields toDefaultTimeout
anddefault_timeout
, respectively) - Renamed the
ConfigUpdateInterval
andconfig_update_interval
configuration fields toRefreshInterval
andrefresh_interval
, respectively.) LoadConfig
function andKameleoonClientConfig.Load
can now return an error.
- Renamed
- The
Cfg
field is no longer accessible. - Renamed
GetFeatureAllVariables
method toGetFeatureVariationVariables
(https://developers.kameleoon.com/feature-management-and-experimentation/web-sdks/go-sdk/#getfeaturevariationvariables) - Removed all methods and errors related to experiments:
- Methods:
TriggerExperiment
GetVariationAssociatedData
GetExperimentList
GetExperimentListForVisitor
- Error types:
ErrExperimentConfigNotFound
ErrNotTargeted
ErrNotAllocated
ErrSiteCodeDisabled
- Methods:
- Changed errors:
- Moved error types into
errs
package - Added
UnexpectedStatusCode
error, which can be thrown by the following methods: - Renamed the following errors:
ErrFeatureConfigNotFound
toFeatureNotFound
ErrFeatureVariableNotFound
toFeatureVariableNotFound
ErrVariationNotFound
toFeatureVariationNotFound
ErrCredentialsNotFound
toConfigCredentialsInvalid
ErrVisitorCodeNotValid
toVisitorCodeInvalid
- Moved error types into
- The new error
FeatureEnvironmentDisabled
may be returned by the following methods: - Changed
Data
types:Browser
:- Added constructor
NewBrowser
- Hid the
Type
andVersion
fields and replaced them with getter methods
- Added constructor
Conversion
:- Added constructors
NewConversion
andNewConversionWithRevenue
- Hid the
GoalId
,Revenue
, andNegative
fields and replaced them with getter methods
- Added constructors
CustomData
:- Changed the data type of the
ID
field toint
- Hid the
ID
field and replaced with a getter method - Renamed
GetValues
toValues
- Changed the data type of the
Device
:- Added constructor
NewDevice
- Hid the
Type
field and replaced with a getter method
- Added constructor
PageView
:- Added constructors
NewPageView
,NewPageViewWithTitle
- Hid the
URL
,Title
, andReferrers
fields and replaced with the getters - Changed
url
from optional to a required parameter
- Added constructors
UserAgent
:- Added constructor
NewUserAgent
- Hid
Value
field and replaced with the getter
- Added constructor
- Reworked cookies:
- Removed
SetVisitorCode
method - Removed
ObtainVisitorCode
method - Removed parameter
topLevelDomain
fromGetVisitorCode
. Instead, use thetop_level_domain
parameter in the configuration - Made
GetVisitorCode
return(string, error)
pair.
- Removed
- Removed methods that were deprecated in 2.x versions:
RetrieveDataFromRemoteSource
- Removed visitor data max size:
- Removed
visitor_data_max_size
configuration field - Removed
VisitorDataMaxSize
field fromConfig
- Removed
- Added a
SetLegalConsent
method to determine the types of data Kameleoon includes in tracking requests. This helps you adhere to legal and regulatory requirements while responsibly managing visitor data. You can find more information in the Consent management policy. - Implemented
KameleoonClientFactory
(https://developers.kameleoon.com/feature-management-and-experimentation/web-sdks/go-sdk/#kameleoonclientfactory) to manageKameleoonClient
instances: - Added
WaitInit
method to wait until the initialization process is completed - Added new parameters for
KameleoonClientConfig
:SessionDuration
(session_duration
configuration field accordingly)TopLevelDomain
field toConfig
(top_level_domain
configuration field accordingly)
- Stability and performance improvements
- Added support for older versions of the Go language. You can now use version 1.12 or later (previously, the minimum version was 1.16).
- Added
GetRemoteVisitorData
method to fetch a visitor's remote data (with an optional capability to add the fetched data to the visitor).
- Stability and performance improvements
- Stability and performance improvements
- Added new conditions for targeting:
Visitor Code
SDK Language
Page Title & Page Url
Browser
Device
Conversion
- Added update campaigns and feature flag configurations instantaneously with Real-Time Streaming Architecture:
Documentation
orProduct Updates
- Added a new methods:
OnUpdateConfiguration
to handle events when configuration data is updated in real timeGetEngineTrackingCode
which can be used to simplify utilization of hybrid mode
- Minor bug fixes
- Minor bug fixing for
is among the values
operator forCustomData
. - Renaming of methods:
RetrieveDataFromRemoteSource
->GetRemoteData
- Added possibility for
CustomData
to use variable argument list of values - Fixed issue with
TriggerExperiment
returning wrong error for client with no experiments - Fixed issue with provided
Config
with not specified values; related to initialization
GetVariationAssociatedData
Fixed. No need to unquote bytes upon obtaining anymore.
- Minor bug fixing
- Removed dependency on first version
- Fixed issue with distribution of v2
- Significantly improved configuration load time
- Added support for Experiment & Exclusive Campaign conditions. Related to
TriggerExperiment
- Renaming of methods:
ActivateFeature
->IsFeatureActive
ErrNotActivated
->ErrNotAllocated
. Related toTriggerExperiment
- Methods added for obtaining experiment and feature flag lists along with feature variables:
- Added support of
is among the values
operator for Custom Data - Added KameleoonData
Device
data. Possible values are: Phone, Tablet, Desktop. - Removed KameleoonData
Interest
- Added method for retrieving data from remote source:
RetrieveDataFromRemoteSource
- Added support of multi-environment for feature flags, Related to
ActivateFeature
,GetFeatureVariable
- Added checking for status of site_code (Enable / Disable). Related to
ActivateFeature
,TriggerExperiment
- Added scheduling functionality for
ActivateFeature
- Added VisitorCodeNotValid exception when empty or exceeding the limit of 255 chars. Related to
ActivateFeature
,TriggerExperiment
,AddData
,TrackConversion
,FlushVisitor
- GraphQL API is using now instead of REST
- Improved SDK stability
- Fixed issue with wrong bucketing. Related to
TriggerExperiment
- Improved SDK stability
- Added Fasthttp