/
Installation instructions - Standalone

Installation instructions - Standalone

Paste the script copied in the previous step before sending a page_view.

The Adloop script will drop a cookie containing the values to send to Analytics. You have to manually retrieve the value of the cookie and add it to your Analytics call.

1. Using a function just before the page_view event

There is now a new function that you can call anywhere you want. This function automatically fills the custom dimensions when using GTAG, GA or PA analytics objects.

It is mandatory to call this function just before the page view event and any other event.

if(typeof window._ADLOOP_SET_CUSTOM_DIMENSIONS != "undefined"){           window._ADLOOP_SET_CUSTOM_DIMENSIONS(true); }

 

2. Using the stored values

In case of a specific setup, it is also possible to set the custom dimensions manually.

It is mandatory to write this code just before the page view event and any other event.

The Adloop dimensions values are stored in a variable called (you write this in the console debugger of your browser if you want to see what’s inside) : 

window.__ADLOOP_VALUES__

For example (in this case, the example implements the queue system of Piano, ‘paq’) : 

if(typeof(__ADLOOP_VALUES__) != "undefined" {   var adloopValues = window.__ADLOOP_VALUES__   window._paq.push(['setProperty', adloopValues.clickDimension, adloopValues.clickCode])   window._paq.push(['setProperty', adloopValues.clickDimensionMeta, adloopValues.clickCodeMeta]) }

 

Please note, this code must be added after the Adloop script and before sending the page_view

Related content

Checking before publishing the script
Checking before publishing the script
More like this
Script installation on GTM
Script installation on GTM
More like this
Installation instructions - with CAX
Installation instructions - with CAX
More like this
Checking that the script is triggered
Checking that the script is triggered
More like this
Set-up the custom dimensions - with GA4
Set-up the custom dimensions - with GA4
More like this
Custom dimensions choice
Custom dimensions choice
More like this