Insightech and AB Tasty
Updated
by Tami Lopez
Overview
This document outlines the integration process of Insightech with ABTasty using Google Tag Manager (GTM). Other Tag Management Systems (TMS) will require a similar process.
Insightech can integrate with 3rd party tools via the data layer because Insightech tracks all events in the data layer object. We will use this approach to integrate Insightech and ABTasty.
Step 1: Push ABTasty Campaign and Variation Data to the Data Layer
Create a custom HTML tag in your GTM and paste the following code into it:
<script>
function getABTasty() {
if (window.ABTasty && window.ABTasty.getTestsOnPage) {
var campaigns = window.ABTasty.getTestsOnPage();
for (var campaignId in campaigns) {
var campaignDetails = campaigns[campaignId];
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'abtasty_campaign',
campaignId: campaignId,
campaignName: campaignDetails.name,
status: campaignDetails.status,
subType: campaignDetails.sub_type,
type: campaignDetails.type,
variationId: campaignDetails.variationID,
variationName: campaignDetails.variationName
});
}
}
}
getABTasty();
</script>
Create a trigger to execute the tag after your ABTasty campaign is run. We recommend using "Window Loaded" as the trigger.
Step 2: Setup Insightech Tracking
Implement your Insightech tracking code on your website. To enable tracking for the data layer:
- Login as the admin of the profile
- Go to Settings → Tracking Code
- Click on the "Change Tracking Settings" button to access the tracking code settings
- Put in "dataLayer" as the dataLayer Object Name
- Click the "Save Settings" button to save the tracking settings
Step 3: Create Segments
Please make sure you have live campaigns running and live traffic to the pages the campaigns are running. Insightech will start to collect the data.
Once the data is collected, you can create segments to use the ABTasty campaigns and variations to segment the features in Insightech, such as Click Maps, Funnel Reports, Session Replays, Dashboards etc.
In a segment, use the "Data Layer Event" with the JSON Path "campaignId" or "variationId" to filter the visitors in a specific campaign or a specific variation. You can find the IDs from your ABTasty user interface.

Our list of integrations is updating weekly. If you want to know if we integrate with your preferred platform, please get in touch with us here.