GA4 Integration via GTM
Last updated
Was this helpful?
Last updated
Was this helpful?
Log in to your GTM account.
Click on the Variables from the sidebar and then click on New button present in User-Defined Variables section.
variablesEnter the title as CustomFit-Exp-Beh-String
Next select the variable type as Data Layer Variable.
Then provide the Data Layer Variable Name as customfit_exp_beh_string.
Set the Data Layer Version as Version 2.
Finally, set the Default value as 0 and click on the Save button.
Click on the Triggers from the sidebar and then click on New button.
Give the Trigger Name as CustomFit-Data-Push-GA4-Trigger.
Next, click on the Trigger Configuration and choose the Trigger type as Custom Event.
Enter the Event name as customfit-data-push-ga4.
Finally, click on the Save button.
Click on the Tags from the sidebar and then click on New button.
Give the Tag Name as CustomFit-Data-Push-GA4.
Next, click on the Tag Configuration and choose the Tag type as Google Analytics. And in Google Analytics select Google Analytics: GA4 Event option.
In the Measurement ID field, enter the Measurement ID of the GA4 account to which the data needs to be sent.
Enter the Event Name as experience_impression.
In the Event Parameters section, click on Add row button. Give the Event Parameter as exp_variant_string and value as {{CustomFit-Exp-Beh-String}}.
Finally click Triggering section, and choose the Firing Triggers as CustomFit-Data-Push-GA4-Trigger. And Click on the Save button.