Setting up Fullstory

3

min

quiz

Fullstory helps you to understand and improve conversions on your website, and identify points of friction.

Key benefits

  • Record and play back all in-broswer interactions
  • Easily segment your playback sessions based on which experiment variations they saw
  • Identify area of optimization thanks to Fullstory and prioritize your roadmap of experiments in Kameleoon

 

Enable Fullstory integration on Kameleoon

As a first step, you will need to have Fullstory installed on your website.

Note: Please note that we do not recommend triggering the Fullstory snippet from Kameleoon as each tool manages its own consent management policy.

On your Kameleoon account, click on “Settings” in the left menu, then on “My Websites”.

On the card of your website, click on “Edit”: you access the configuration of your website on Kameleoon.

In “Configuration”, unfold the “General” section.

The “Global custom script” insert will allow you to link Kameleoon to Fullstory. Any JavaScript code you add in this insert will be executed each time the page is loaded. This feature is usually used to add complex tracking code or integration to other solutions.

To activate the bridge between Kameleoon and Fullstory, please copy and paste the code below in the Global script section.

window.fullstory_triggered_campaigns = window.fullstory_triggered_campaigns || [];
function _fs() { return window[window['_fs_namespace']]; };

var processCampaignForFullstoryPlatform = function(campaign)
{
 var campaignId = campaign.id;
 var associatedVariationId = campaign.associatedVariation.id;
 var campaignName = campaign.name;
 var associatedVariationName = campaign.associatedVariation.name;
 
 var fsEventPayload = {};
 fsEventPayload.campaign = {};
 fsEventPayload.campaign.id_int = campaignId;
 fsEventPayload.campaign.name_str = campaignName;
 fsEventPayload.variation = {};
 fsEventPayload.variation.id_int = associatedVariationId;
 fsEventPayload.variation.name_str = associatedVariationName; 
 
 Kameleoon.API.Core.runWhenConditionTrue(function(){
 return typeof _fs() == "function";
 }, function(){
 if(fullstory_triggered_campaigns.indexOf(campaignId) == -1){ 
 _fs().event('Kameleoon campaign', fsEventPayload, 'Kameleoon');
 fullstory_triggered_campaigns.push(campaignId);
 console.log("Fullstory tracking sent for campaign: "+campaignId);
 }
 }, 500);
}

// We loop over the experiments
Kameleoon.API.Experiments.getActive().forEach(processCampaignForFullstoryPlatform);
window.addEventListener("Kameleoon::ExperimentActivated", function(event) {
 processCampaignForFullstoryPlatform(event.detail.experiment);
});

// We loop over the personalizations
Kameleoon.API.Personalizations.getActive().forEach(processCampaignForFullstoryPlatform);
window.addEventListener('Kameleoon::PersonalizationActivated', function (event) {
 processCampaignForFullstoryPlatform(event.detail.personalization);
});

 

This code will send data to Fullstory whenever a visitor is being targeted by an experiment or a personalization. By default, we send the name and ID of the campaign, and the name and ID of the associated variation. You can adapt the code to your needs.

You can click on “Validate” to apply the changes to your configuration.

This custom bridge is based on Fullstory JavaScript API. To know more, please refer to this documentation.