Custom Integration Connector with a 3rd party tool

The Custom Integration Connector enables you to integrate with any 3rd party tool that is not natively provided by AB Tasty, such as an analytics tool.

Definition

 

The purpose of a Custom Integration Connector is to share campaign and variation information from AB Tasty to your analytics tool. This way, you will be able to read the results of your campaign directly in the analytics tool you chose.

 

Configuration

 

To add a Custom Integration, you need to write JavaScript code that is executed by the ABTasty tag every time a visitor is exposed to a variation. 
Writing this code requires basic knowledge of JavaScript and requires knowing which API is provided by the analytics service you want to integrate. 
This code is linked to some built-in variables that will be replaced by the AB Tasty tag at runtime. These variables include:

  • {{campaignId}}: the ID of the campaign
  • {{campaignName}}: the name of the campaign
  • {{variationId}}: the ID of the variation (or 0 for the Original version)
  • {{variationName}}: the name of the variation

If a visitor is exposed to two campaigns on the same page, the code will be executed twice.For  example, let’s say you write this code in your Custom Integration:

console.log('Custom Integration code\n')
console.log('Campaign Name : %s\n', {{campaignName}})
console.log('Campaign Id : %s\n', {{campaignId}})
console.log('Variation Name : %s\n', {{variationName}})
console.log('Variation Id : %s\n', {{variationId}})


If you browse the page with two active campaigns using this integration, this is what you will see in your developer console:

Integration_console.jpeg


After saving your Custom Integration Connector, it will be displayed in the list of available Integrations on the
Web Analytics page of the Settings as well as in the Advanced options step of the campaign creation flow.

Good to know 💡

If you modify the code or delete a Custom Integration Connector, the changes will apply to all campaigns on which the Integration is active, including campaigns currently using it. If you want your changes to apply immediately, refresh your tag after editing or deleting a Custom Integration.

 

Use case

 

Here is an example of custom integration with a fictional service called “Action360 Analytic”:

Custom_action360.jpeg

Your custom integration will now be displayed in the list of available integrations:

Integration_list.jpeg

It will also be displayed in the list of available Integrations in the Advanced options step of the campaign creation flow:

Integration_advanced_options.jpeg

Was this article helpful?

/