You can link Google Analytics with AB Tasty to be able to analyze your campaigns outside of the AB Tasty reporting. Your campaign data will be sent directly to GA as events or dimensions. For more information on how to find AB Tasty data in Google Analytics, refer to Finding AB Tasty data in Google Analytics.
Activating the integration
You can choose to configure the integration either:
The configuration works the same way, the only difference is that configuring the integration at the account level will activate the integration for all new campaigns while at the campaign level, it will apply for a specific campaign only.
At the account level
You can link your AB Tasty account with GA in your account settings.
In this case, the integration settings will be automatically applied to new campaigns (the integration is not retroactive). If you want to link an existing campaign with GA, you need to configure the integration at the campaign level.
To access the account settings, you must have the Admin role (see Access rights and user management).
- Go to the AB Tasty settings > Integrations > Web Analytics Tools.
- Turn the Google Analytics (Universal) toggle ON.
- Configure the following fields:
At the campaign level
The integration will apply for the selected campaign only.
- Go to the Advanced options step of your campaign > Third-party Integrations.
- Select Google Analytics (Universal).
- Configure the following fields:
Filling in the fields
To find the required information and to verify that data is correctly sent to Google Analytics, you will need the GA Debugger add-on.
Implementation
Select which GA tag you are using:
- Analytics.js: the old version of the Google tag.
- Gtag.js: the new Google tag.
Custom index
AB Tasty can send data to GA through events or custom dimensions. To use a custom dimension, you must create it in GA beforehand and then enter the corresponding number in the Custom Index n° field.
If you use a custom dimension at the account level, and if there are several campaigns running at once, data from all live campaigns will be linked to the same custom index and will be overwritten. Therefore, we recommend using the custom index at the campaign level or not using it at all.
Tracker name
The tracker name can be seen as a username given to the data by GA in order to retrieve it later. This is the most important field as the integration is based on this variable.
To retrieve the tracker name:
- Go to your website and turn the GA Debugger add-on ON.
- Right click the page and inspect it.
- Go to the “console” tab: you should see data and information about Google Analytics.
- Search for “new tracker” (with CMD+F on Mac or CTRL+F on Windows):
Here, the tracker name is “gtm4”. Depending on how Google Analytics has been configured, you will see different results. If you see something different than “gtmXX”, you can copy the tracker name in the dedicated field in AB Tasty. If not, there are some extra steps.
If the tracker name you see in the console starts with “gtm”, this means that your GA account is managed via Google Tag Manager. In this case, the tracker name is random and Google can modify it at any time. You can either keep it as is, with the risk that the integration no longer works in a few weeks or months, or fix the tracker name in GTM directly.
To do so:
- In GTM, go to Universal Tag and edit the tag configuration.
- Find the tracker type = page view. Select "Enable priority settings".
- Add the tracking ID (= GA account ID (example: UA-12345678-1).
- Click More settings > Advanced configuration > Set tracker name = True
- Define the tracker name. Identify it in any way you want, and copy it in AB Tasty settings (avoid special characters and spaces).
If you leave the original GTM tracker, it may be modified over time and the link may no longer work.
Function name
To retrieve the function name, go to the console and search for “running command”:The function name is the word before the parenthesis: Running command: function name(“create”, …).
Most of the time, the function is called "ga".
Verifying that AB Tasty data is correctly sent to GA
Once you have filled in all the required fields (at the account or at the campaign level), you will need to verify that the data is correctly sent to GA.
You must update the AB Tasty tag to make your changes live.
To QA the integration, you must be affected to a campaign where the integration has been configured.
The GA Debugger add-on will help you verify that data is correctly sent to Google Analytics.
- Turn the GA Debugger add-on ON.
- Open the console.
- Search for “AB Tasty” (with CTRL+F on Windows or CMD+F on Mac).
If you see “Sent beacon” below the running command and the “eventCategory (&ec)” line set to “AB Tasty” (like in the screenshot below), this means that data is correctly sent to GA and you should see events coming through GA’s realtime dashboard.
If you see “Command ignored. Unknown target: undefined” below the running command, this means that the integration wasn’t carried out correctly.
Be careful to check the running command for the campaign in which the integration has been configured. In the screenshot above, we can see that this command matches test ID 615868. If it is not the right campaign, search for the other results.
If the command is ignored in the console for the running command, it may be due to one of the following reasons:
- You are not affected to the campaign
Check that you are affected to the campaign by using the QA Assistant or the ABTasty.results command in the console. - The tag wasn’t refreshed after the fields were configured
Check that the tag is up to date. If this isn’t the case, click the “Tag” button in the header: - The tracker name is incorrect
Most of the time, this explains why data is not sent to GA. In this case, try with another tracker name (if any) via the GA Debugger add-on. Repeat the steps mentioned here.
Copy and paste the new tracker name in AB Tasty, refresh the tag and test the integration again.
Repeat the process with all tracker names until data is sent.
Comments
0 comments
Please sign in to leave a comment.