Send view event data from Optimize to your own analytics tools.
You can forward view events from Optimize to your internal analytics system or a third-party platform using the client-side onVariationRecorded() API. By registering a callback, you’ll receive data after all variations have rendered on the page.
Set up a client-side integration
To begin, write a callback function and place the following JavaScript on any page where variations are running. Use the following code as an example, while referencing our API documentation.
intellimize.ready(function() {
intellimize.onVariationRecorded(function(variationId) {
// do something with variationId
}, function(error) {
// do something with error (string)
});
});
Note
A callback will be fired for each variation that is recorded.
Access full experience and variation data
If you need configuration data — such as the full list of experience and variation names — Optimize also provides a server-side REST API called Customer. This API returns a full library of experiences and variations currently configured in your account.
Note
The JavaScript API only provides data for individual impressions. Use the server-side API to access complete configuration details.