Adobe Analytics

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. If it’s not the case, the push integration can’t work. 

  • You have to know on which variable the Adobe tag is included on your website. By default, the Adobe variable is “s”. (but you can choose another variable). 

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: 

 

  1. Access Integrations > Integration Hub.
  2. Search for and select Adobe Analytics.
  3. Click Setup connector.
  4. Give a name to your connector so you can easily retrieve it.
  5. Give the eVar on which you want the AB tasty event to be stored. (mandatory)
  6. Give the variable name where the Adobe object is declared (see Requirements menu). (mandatory)
  7. Enter the type of integration you want. More explanation of this field below of this document (field mandatory). 
  8. Click Save and create connector.

The integration is now set up and will be available when creating a new campaign.
More information on how to link a campaign here.

 

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.

Was this article helpful?

/