Case of GA tags in GTM WITH cookieless feature
Setting up Google Tag Manager to enable proxying WITH the Helper's cookieless tracking feature.
For a Google Analytics 4 (GA4) via GTM setup, the basic procedure consists of creating variables and triggers as explained below.
1) Proxy Settings
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”

2) Variables
To get started, go to the “Variables” section of GTM.

a) Variable "Helper UUID"
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

b) "Helper partner Id" variable
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

c) Variable "Helper Conf Id"
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

d) Variable "Helper Consent Signal"
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

e) "Google Tag: Configuration Settings" configuration variable
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 2) 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 fourth line, and select the “Helper Partner Id” variable you created in 2) b) in the second field (“Value”)
Enter "sah_c” in the first field (“Config Parameter”) of the fifth line, and select the “Helper Conf Id” variable you created in 2) c) in the second field (“Value”)
Enter "sah_consent” in the first field (“Config Parameter”) of the sixth line, and select the “Helper Consent Signal” variable you created in 2) d) in the second field (“Value”)

3) Trigger
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 (gtag.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 tag if you use or plan to use GA4 via GTM.
4) GA4 tag
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 2) e) in the "Configuration Settings Variable" field and save
Finally, in the last “Trigger” section, select the “UUID ready” trigger that you created in 3) then save

Use this configuration for GA Events tracking.
Repeat this step if you want to create another GA4 tag. If you have event tags, go to the trigger configuration step below.
Otherwise, publish your container to complete the activation of Sirdata Analytics Helper.
5) Trigger Configuration
Once your 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 three 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
a) Tag with one or multiple triggers for a single or standard event

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.
b) Special Case of Multiple Event Triggers:
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.
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.

Congratulations!
Mis à jour
