Articles on: Client Side

Creation of the Google Tag (GA4 Configuration Tag)

Create a GA4-configurationtag within your *GTM Web container*

Click on Tags > New. Enter a name for the tag at the top (e.g., “GA4 Configuration”)

Select ‘Google Tag’ in the Tag Configuration box



Select your GA4 Measurement ID variable for the input field of your GA4 ID.



Haven’t saved your GA4 Measurement ID in a constant variable yet? Then follow these steps.

Fill in the configuration parameters:



For the parameter, enter “send_page_view” and for the value, enter “false”.

For the parameter, enter “clientId” and for the value, create a variable. This variable is a DataLayer with marketing.user_id.

For the parameter, enter “sessionId” and for the value, create a variable. This variable is a DataLayer with marketing.session_id.

For the parameter, enter “session_count” and for the value, create a variable. This variable is a DataLayer with marketing.session_count.

For the parameter, enter “first_party_collection” and for the value, enter “true”.

For the parameter, enter “server_container_url” and for the value, provide the URL of the Google Tag Manager server, so the data is sent to the server container via Google Tag Manager.

For the parameter, enter “x-fb-ck-fbc” and for the value, create a variable. This variable is a ‘First Party Cookie’ variable with the value “_fbc”.

For the parameter, enter “x-fb-ck-fbp” and for the value, create a variable. This variable is a ‘First Party Cookie’ variable with the value “_fbp”.



For the parameter, enter “ttclid” and for the value, create a variable. This variable is a ‘First Party Cookie’ variable with the value “cookie_ttclid”.

For the parameter, enter “ttp” and for the value, create a variable. This variable is a ‘First Party Cookie’ variable with the value “_ttp”.



(Optional) For the parameter, enter “user_data” and for the value, create a variable. This variable is a “User-provided data” variable with ‘Manual Configuration’ and for Email, select the variable where the user’s email is stored.

If you add all these parameters, it should look something like this:

Google Tag Parameters

Click on ‘Triggers’ and select the trytagging_user_data trigger to ensure that the Google Analytics 4 configuration tag is always activated when the correct user and product information is present.



If you don’t have a trytagging_user_data trigger yet, create a new trigger with the trigger configuration set to ‘custom event’ and name it “trytagging_user_data”.



If you are not using the AdPage DataLayer, trigger on ‘Initialization’.

Save the tag

Within Google Tag Manager, click on ‘Preview’. Now open your own website, and if everything is set correctly, you will see that Google Tag Manager has fired the configuration tag.



Click "send" to push the changes

Updated on: 16/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!