Adobe Analytics is a data tracking and analysis platform that enables businesses to understand user behavior on their websites and applications, providing valuable insights to optimize online performance. With advanced visualization and reporting features, Adobe Analytics helps businesses make strategic decisions based on reliable, real-time data.
The Adobe Analytics integration allows you to send the AB Tasty campaign data to Adobe.
How Campaign Data Is Sent
AB Tasty campaign data are sent as a custom event with event properties:
- The event is stored inside an eVar Adobe Analytics”
- This AB Tasty event contains the Campaign ID, Campaign Name, VariationID and VariationName formatted as [Campaign ID] Campaign Name - [VariationID] VariationName
The event is sent using the Adobe Analytics tl() method. More information on this method here.
How to Set up the Integration
Requirements:
1- You must have the Adobe Analytics tag inside your website. It's recommended to implement Adobe Analytics with AppMeasurement for JavaScript.
Please follow this documentation provided by Adobe Analytics. As soon as you are done, you must set some variables.
Once done, you must retrieve the variable you have access to in AppMeasurement. Most of the time, it will be window.s. If you don't have any access to AppMeasurement, you can use the push integration.
You can see on this example the Adobe Analytics object:
2- We recommend you to load the AB Tasty tag in a synchronous way, as you can make sure that some variables or functions provided by the AB Tasty tag are available.
AB Tasty Configuration:
- Access Integrations > Integration Hub.
- Search for and select Adobe Analytics.
-
Click Setup connector.
- Give a name to your connector so you can easily retrieve it.
- Give the eVar on which you want the AB tasty event to be stored. (mandatory)
- Give the variable name where the Adobe object is declared (see Requirements menu). (mandatory)
- Enter the type of integration you want. More explanation of this field below of this document (field mandatory).
- [Optional] Check the box to automatically add the connector to your future campaigns.
- Click Save and create connector.
If you have checked the box, the connector will be automatically added to the Advanced step of your future campaigns. However, it is not applied retroactively to previously created campaigns.
If you left the box unchecked (default behavior), your connector won't be added automatically. You can still decide to send campaign data to your connector by selecting it from the Advanced options step of your campaign. More information on how to link a campaign is here.
You can also modify this behavior from the Integration hub, by editing your connector configuration (check or uncheck box).
Integration type for Adobe Analytics ⚡
Regarding the “integration type” field when creating the integration, you can choose between 3 different types:
-
Standard integration: the integration type must be empty.
For this type of integration, we insert the AB Tasty event in one Adobe Analytics hit. It could be a page_view hit, or another hit, it doesn’t matter. As soon as we have inserted the AB Tasty event inside the Adobe Analytics hit, we’ll send it. You have nothing to do on your side
-
“Dispatch by client” integration: You have to input “1” inside the integration type field.
For this type of integration, AB Tasty won’t send any hits. We’ll just add the AB Tasty event inside the Adobe Analytics object. But you’re the owner of the decision when you want to send one hit. In order to do that, AB Tasty provides you with one global variable available on window.
window.ABTasty.omnitureProcessed
By default, window.ABTasty.omnitureProcessed = false. Indeed, if this variable is at “false”, it means that the Adobe Analytics object doesn’t include the AB Tasty event
if window.ABTasty.omnitureProcessed === true : It means that we have loaded the AB Tasty event inside the Adobe Analytics object. Since the variable is true, you can send the hit to Adobe Analytics. But, we are not responsible for sending the hit.
Requirement for this option
If you choose this option (1), you need to code on the front-end of your website in order to know when the window.ABTasty.omnitureProcessed is true.
You can, for example:
- Test the variable only one time (when the Adobe Analytics is loaded). Be careful, if the AB Tasty tag is not loaded, the integration can’t run correctly.
- Try several times:
Either with a setInterval method for example:
const LIMIT = 10;
let NB_TRY = 1;
const checkOmnitureProcessed = () => {
const intervalProcessed = setInterval(() => {
if (NB_TRY > LIMIT) {
return clearInterval(test);
}
if (window.omnitureProcessed === true) {
console.log('YOU HAVE TO SENT THE HIT ON YOUR SIDE');
return clearInterval(intervalProcessed)
}
NB_TRY++
}, 1000)
}
checkOmnitureProcessed();
Or with a recursive function:
const LIMIT = 10;
let NB_TRY = 1;
const recursiveOmnitureProcessed = () => {
if (NB_TRY > LIMIT) {
return console.log('END of test');
}
if (processed === true) {
return console.log('YOU HAVE TO SENT THE HIT ON YOUR SIDE');
}
NB_TRY++
retun recursiveOmnitureProcessed()
}
NB : You don't have to use these two codes. You can have your own code. It’s only an example. If you want to implement another code, you can too.
-
“Custom async” integration: You have to input “2” inside the integration type field.
If you choose this option, AB Tasty sends the hit. However, we need your validation before we send the hit. AB Tasty sends the hit via the tl() function as a custom link with this function:
window[variableName].tl(true, 'o', 'ABTasty async event');
We don’t send the hit before having your authorization. In order to do that, we provide you one AB Tasty function you can access from the window. This function is :
window.ABTasty.processOmniture()
Requirement for this option
If you choose this option (2), you need to code on the front-end of your website in order to call the window.ABTasty.processOmniture function. As soon as you call it, only ONE hit will be sent with the AB Tasty inside the Adobe Analytics object.
You can, for example:
- Call the function only one time like that
const variableName = xx // the name of the variable where is your Adobe analtycs Object is stored. By default "s".
try {
console.log('trying to run AB tasty, window.ABtasty');
if (window.ABTasty) {
ABTasty.processOmniture(variableName);
console.log('ABTasty.processOmniture executed successfully');
}
} catch (e) {
console.log('error AB tasty', e)
}
Be careful with this call. Indeed, this call is done only one time. It could work only if the AB Tasty tag is already present. If not, the integration can’t run correctly.
- Wrap this function with a setInterval method
const LIMIT = 10;
let NB_TRY = 1;
const checkProcessAdobe = () => {
try {
const intervalProcessAdobe = setInterval(() => {
if (NB_TRY > LIMIT) {
return clearInterval(intervalProcessAdobe);
}
if (window.ABTasty) {
window.ABTasty.processOmniture('s');
return clearInterval(intervalProcessAdobe);
}
NB_TRY++
}, 1000)
} catch (e) {
console.log('error AB tasty', e)
}
}
checkProcessAdobe();
With this code, you check during 10 seconds if the AB Tasty is loaded or not.
NB : You don't have to use these two codes. You can have your own code. It’s only an example. If you want to implement another code, you can too.
Heads up ⚡
You must update the AB Tasty tag to make your changes live.
Good to Know 💡
Please note that the setup of integration in the account settings is not applied retroactively to previously created campaigns. They only apply to newly created campaigns.