/
Installation instructions - with CAX

Installation instructions - with CAX

  • Go onto the Commanders Act platform

  • Choose the appropriate container. It is essential that the tag is triggered on all landing pages.

Tags template selection

Capture d'écran 2023-03-13 115313-20240111-152136.png
  • Go to the step of choosing tag templates

  • Search for “Adloop” in the search bar

  • Choose the “Adloop Tracking and Attribution” template. You’ll be redirected to the editing step.

Contener connection and selection

Template edition

Fill in the 3 following fields:

  • The custom(s) dimension(s) configured in your Analytics tool

    • If several, they should be separated by a comma ( , )

  • Subdomains that should be considered as a separate referrer

    • Example: blog.website.com is not be considered as internal but as a referrer

  • Referrers to be excluded (the list should be the same as the one in your Analytics tool), like payment platforms

image-20250218-150922.png

Consent

  • Set the consent for the Adloop tag (Analytics/Measurement category)

Publishing

  • Install the new “Adloop Tracking & Attribution” tag and place it in first position. There is no need to add some triggers (except Container loaded)

There are two ways to set up the custom dimensions:

  1. Using a function just before the page_view event

There is 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 (add_to_cart, purchase etc.)

if(typeof window._ADLOOP_SET_CUSTOM_DIMENSIONS != "undefined"){ window._ADLOOP_SET_CUSTOM_DIMENSIONS(true); }
  1. Using the stored value

In case of a specific setup, it is also possible to set the custom dimensions manually (if the usual method doesn’t work, most probably because of the execution order of the Adloop tag).
It is mandatory to write this code just before the page view event and any other event.

a. For Piano Analaytics

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]) }

Notes for debugging:

There are some debugging logs for this new feature, that you can access in the console debugger of your browser.

For you to be able to see it, you need to create a new cookie for the website that you are setting up (using a browser extension, like Cookie Master)

The cookie must be named “tCdebugLib” and can have any value (1, for example).

With this cookie, you will see that kind of logs : 

b. With GA4

In the pageview tag, add after the params var definition, add the following code:

If you are using server-side

If server-side tracking is being used for GA4 events (or another tool), it is possible to add the Adloop parameters to these as well. There's no need to modify the individual events; instead, you can add a tag that sets these two parameters for all events.

The code for the tag is as follows:

 

 

This tag should be inserted after the AdLoop template but before the one tag for the server-side events.

 

On the GA4 destination side, these parameters need to be added to the mapping if the option to send all parameters to GA4 is not enabled.

 

 

Related content

Script installation on Commanders Act CAX
Script installation on Commanders Act CAX
More like this
Script installation on GTM
Script installation on GTM
More like this
Installation instructions - Standalone
Installation instructions - Standalone
More like this
Checking before publishing the script
Checking before publishing the script
More like this
Set-up the custom dimensions - with GA4
Set-up the custom dimensions - with GA4
More like this
Analytics data-sources
Analytics data-sources
More like this