Case of GA tags in GTM WITH cookieless feature
Setting up Google Tag Manager to enable proxying WITH the Helper's cookieless tracking feature.
Dernière mise à jour
Setting up Google Tag Manager to enable proxying WITH the Helper's cookieless tracking feature.
Dernière mise à jour
For a parameter from Google Analytics via GTM, the basic procedure is the same whether you are using Universal Analytics 360 via GTM and/or GA4 via GTM, and consists of creating variables and triggers as explained below.
WARNING: the purpose of proxyfication is to prevent direct identification of the user by the American intelligence services, or indirect via access to data obtained from Google.
The very principle of this service is therefore to break the direct link between Google Analytics and all the other Google services.
If you measure the effectiveness of Google Ads advertising via Google Analytics, or if you share remarketing audiences, you must make arrangements to work differently because these features will not work.
For example, you may consider using Google Ads pixels or tags (remarketing and/or conversion measurement) if you believe their use is compliant.
If in doubt, do not hesitate to ask our teams to perform these tag settings for you.
Remember to declare your property identifiers (or not declare any) in your Analytics Helper console, otherwise the Pings Analytics that will pass through the proxy may be blocked
WARNING: before proceeding below, please make sure that you have checked the “Activate cookieless mode” box in the Helper portal (https://helper.sirdata.io/).
Go to “Configuration” / “Edit information” / check “Activate cookieless mode”
To get started, go to the “Variables” section of GTM.
Click on “New” to create a “User Defined Variable”:
Name this variable “Helper UUID” or otherwise
Choose variable type “data layer variable”
In the “Name of data layer variable” box, enter “sdh_UUID”
Keep the “version 2” and check the box “Set default value”
Enter the value “redacted_for_privacy” in the “Default Value” and save
Click on “New” to create another “User Defined Variable”:
Name this variable “Helper Partner Id” or otherwise
Choose variable type “data layer variable”
In the “Data layer variable name” box, type “sah_pa”
Keep the “version 2” and check the box “Set default value”
Leave the “Default Value” empty and save
Click on “New” to create another “User Defined Variable”:
Name this variable “Helper Config Id” or otherwise
Choose variable type “data layer variable”
In the “Data layer variable name” box, type “sah_c”
Keep the “version 2” and check the box “Set default value”
Leave the “Default Value” empty and save
Click on “New” to create another “User Defined Variable”:
Name this variable “Helper Consent Signal” or otherwise
Choose variable type “data layer variable”
In the “Data layer variable name” box, enter “sah_consent”
Keep the “version 2” and check the box “Set default value”
Specify "0" (zero) in the “Default value” box, and save
If you use or plan to use Universal Analytics 360 via GTM, then click on “New” to create a “Utilities Variable”:
Name this variable “Analytics” or something else
Choose the variable type “Google Analytics Settings”
In the “Tracking ID” box enter your Universal Analytics 360 property ID identified in the first step (of the form UA-XXXXXX-Y).
Expand the “More parameters” section, then “Fields to define”, and add 6 lines
Enter “clientId” in the first field (“Name”) of the first line, and select the “Helper UUID” variable you created in 1) a) in the second field (“Value”)
Enter “anonymizeIp” in the first field (“Name”) of the second line, and enter “true” in the second field (“Value”)
Enter “transport” in the first field (“Name”) of the third line, and enter “xhr” in the second field (“Value”)
Enter “storage” in the first field (“Name”) of the fourth line, and enter “none” in the second field (“Value”)
Enter "&ep.sah_pa” in the first field (“Name”) of the fifth line, and select the “Helper Partner Id” variable you created in 1) b) in the second field (“Value”)
Enter "&ep.sah_c” in the first field (“Name”) of the sixth line, and select the “Helper Conf Id” variable you created in 1) c) in the second field (“Value”)
Enter "&ep.sah_consent” in the first field (“Name”) of the sixth line, and select the “Helper Consent Signal” variable you created in 1) d) in the second field (“Value”)
In the “Advanced configuration” section, in the “Transport URL” field, enter “https://event.analytics-helper.com/g”
Repeat the operation one or more times if you use or plan to use one or more other Universal Analytics 360 property identifiers.
Do not delete your own field values, and in case of duplicate prefer the values above.
If you use or plan to use GA4 via GTM, then click on “New” to create a “Utilities Variable”:
Name this variable “GA4 Configuration” or something else
Choose the variable type “Google Tag: Configuration Settings”
Expand the “Config Parameter” section with 6 lines
Enter “client_id” in the first field (“Config Parameter”) of the first line, and select the “Helper UUID” variable you created in 1) a) in the second field (“Value”)
Enter “server_container_url” in the first field (“Config Parameter”) of the second line, and enter “https://event.analytics-helper.com/g” in the second field (“Value”)
Enter “send_page_view” in the first field (“Config Parameter”) of the third line, and enter “true” in the second field (“Value”)
Enter "sah_pa” in the first field (“Config Parameter”) of the fifth line, and select the “Helper Partner Id” variable you created in 1) b) in the second field (“Value”)
Enter "sah_c” in the first field (“Config Parameter”) of the sixth line, and select the “Helper Conf Id” variable you created in 1) c) in the second field (“Value”)
Enter "sah_consent” in the first field (“server_container_url”) of the seventh line, and select the “Helper Consent Signal” variable you created in 1) d) in the second field (“Value”)
Now go to the “Triggers” section and click on “New”.
Then configure the trigger like this:
Name this new trigger “UUID ready” or otherwise
Choose the “Trigger Type” named “Custom Event”
Enter “sdh_UUID_ready” in the “Event name” box
Keep the “All custom events” box checked and Save
For this trigger and the cookieless functionality to work, it is mandatory that you have the helper script installed on your page.
If you use a "hard-coded" version of the Google Analytics script (analytics.js, gtags.js) in your source code, or if you use both "hard-coded" tags and Analytics tags via GTM, this script takes the form following, and must be installed in your source code:
If you are not using any hard-coded Google Analytics script, i.e. if you exclusively drive Google Analytics from the Google Tag Manager tag, you can use the dedicated "uuid" helper script:
If you are using GTM and a non-standard dataLayer name ("dataLayer"), you can declare it using the "dl" parameter. For example if your dataLayer name is "customDataLayer", you can add "&dl=customDataLayer" to the helper script:
If you prefer, you can install this script directly on the page or load it via GTM ("custom HTML" tag), using the "Consent Initialization" trigger:
Now configure your GA4 beacon if you use or plan to use GA4 via GTM , and/or skip to the Universal Analytics 360 beacon configuration section if you use or plan to use Universal Analytics 360 via GTM.
Go to the “Tags” section and click on “New” or select your existing GA4 tag if you have already created one.
Then configure the tag like this:
Name this new tag “Google Analytics Configuration GA4” or otherwise
Choose the “Tag Type” named “Google Tag”
In the “Tag ID” box enter your GA4 property identifier identified in the first step (in the form G-12456789).
Expand the “Configuration settings” section
Select the "GA4 Configuration" variable you created in 1) f) in the "Configuration Settings Variable" field and save
Finally, in the last “Trigger” section, select the “UUID ready” trigger that you created in 2) then save
Use this configuration for GA Events tracking.
Repeat this step if you want to create another GA4 tag, or go to the next step if you want to create or configure a Universal Analytics 360 tag.
Otherwise, publish your container to complete the activation of Sirdata Analytics Helper.
Go to the “Tags” section and click on “New” or select your existing Universal Analytics 360 tag if you have already created one.
Then configure the tag like this:
Name this new tag “Google Analytics Universal Analytics 360” or otherwise
Choose the “Tag Type” named “Google Analytics: Universal Analytics”
In the “Google Analytics Settings” box choose the “Analytics” variable you created in 1) d)
Finally, in the last “Trigger” section, select the “UUID ready” trigger that you created in 2) then save
Repeat this step if you want to create another Universal Analytics 360 tag, otherwise publish your container to complete Sirdata Analytics Helper activation.
Once your UA 360 or GA4 configuration tags are set up, it is necessary to modify the triggers for your event tracking, if you have any. This is because if an event is triggered before the main tag, the client ID may not be available, and the statistics could be inaccurate.
There are tree types of events:
Events triggered on page load ("page view," "view_item," etc.): You need to configure their tracking using trigger groups.
Others are triggered after the page has loaded and correspond to a single user action ("purchase," "form_submit," etc.): You can configure their tracking using trigger groups.
Others are triggered after the page is loaded and correspond to a potentially multiple user action (“scroll”, “click”, “add_to_cart”...): you cannot use groups of triggers, but you can add an optout exception to their triggers
For events triggered after the page has loaded and correspond to potentially multiple user actions ("scroll," "click," "add_to_cart," etc.), you cannot use trigger groups. However, you can add an "optout" exception to their triggers.
Go to the tag you want to configure with an existing trigger:
Configure the tag as follows:
In the "Triggering" section, add a "Trigger Group".
Select the existing trigger and add the trigger "UUID ready".
Finally, delete the old trigger if there was one.
Repeat this step for all your single event tags that already have a trigger.
To manage events such as scroll or clicks, first, create an opt-out variable that corresponds to a user who has declined/withdrawn their consent and opted out of tracking:
Name the variable "GA Helper Optout Cookie," for example.
In the "Variable Type" section, choose "First-party Cookie".
In the "Cookie Name" section, add "ga_helper_optout" exactly as it is without any modifications.
You can now use this variable to manage exceptions.
WARNING: Do not use this method for events unrelated to user actions. Use trigger groups for those cases.
If the existing trigger on your Analytics tag is a Click event:
Example:
Configure the "click" trigger as follows:
Check "Some Clicks."
Enter the firing condition: "GA Helper Optout Cookie" is not equal to 1.
Save your changes.
If you have any doubts, don't hesitate to reach out to the experts at Sirdata to have them configure your Tag Manager on your behalf.
Congratulations!