To track the utm_apostle parameter in Google Analytics 4 (GA4) using Google Tag Manager (GTM), follow these steps:
Google Tag Manager
Google Analytics (GA4)
Build a Report in GA4 with the Custom Dimension
1. Google Tag Manager
Step 1: Set Up Google Tag Manager (GTM) to Capture UTM Parameters
Log into Google Tag Manager:
Go to Google Tag Manager and select the correct container.
Create a Variable to Capture the UTM Parameter:
Go to "Variables" in the left-hand menu.
Click on "New" under the User-Defined Variables section.
Name the variable something like: utm_apostle.
Click on "Variable Configuration" and select "URL".
In the Component Type dropdown, choose "Query".
In the Query Key field, type utm_apostle.
Click "Save".
Step 2: Send the Captured UTM Parameter to GA4
Modify Your GA4 Event Tag to Include the UTM Parameter:
Create a new GA4 event by clicking "New" -> "Tag Configuration" -> "Google Analytics: GA4 Event".
Under "Event Parameters", click "Add Row".
Parameter Name: Enter utm_apostle.
Value: Click on the variable icon and select the utm_apostle variable you created earlier.
Click "Save".
Set Up a Trigger (if not already in place):
Ensure that the GA4 event tag is triggered on the appropriate pages or events (e.g., All Pages or a specific event trigger).
Publish Your Container:
Click "Submit" in the top-right corner to publish your changes in GTM.
Step 3: Verify the Parameter in GA4
Test the Implementation:
Use Google Tag Manager's Preview Mode to test that the utm_apostle parameter is being sent correctly.
Navigate to your website using a URL with the utm_apostle parameter, and check the data layer in GTM's debug mode.
To add and track a custom UTM parameter like utm_apostle in Google Analytics 4 (GA4), you need to follow several steps. Here's a full step-by-step guide:
2. Google Analytics (GA4)
Step 1: Set Up the Custom UTM Parameter in GA4
Log into Google Analytics 4 (GA4):
Go to Google Analytics and select your GA4 property.
Create a Custom Dimension for the UTM Parameter:
Navigate to "Admin" (the gear icon in the lower-left corner).
In the "Data display" column, click on "Custom Definitions".
Select "Create Custom Dimension".
Name: Enter a name like UTM Apostle (this is for internal use).
Scope: Select "Event".
Event Parameter: Type utm_apostle.
Click "Save".
Step 2: Ensure GA4 Tracks the UTM Parameter
Verify that the Parameter is Collected:
Go to your website and navigate using the URL with the utm_apostle parameter. (www.yourwebsite.com?utm_apostle=test)
Open GA4 and go to the "Realtime" report.
Look for your visit under the "Events" section.
Click on the custom event you created (UTM Apostle)
Click on utm_apostle (next page)
Here you should see the parameter value you’ve put after utm_apostle=
WAIT 24-48 HOURS FOR THE PARAMETER TO BECOME VISABLE IN REPORTS
3. Build a Report in GA4 with the Custom Dimension
Create a Custom Exploration Report:
In GA4, go to "Explore".
Click "Blank" to start a new exploration.
Under "Settings" make sure the technique "Free-form" is selected as well as the "Table" visualisation
Add the "UTM Apostle" custom dimension to your report.
Under "Variables", click "Dimensions", + icon, and then "Custom Dimensions".
Select UTM Apostle and click ''Nested rows'' to yesApply".
Optional: add "Page path and screen class" as a second dimension.
Drag UTM Apostle into the "Rows" or "Columns" section.
Add relevant metrics like "Active users", "Sessions" or "Conversions" to the "Values" section.
If you haven’t already add these metrics, you can add them with the + icon.
You can now see the performance of your utm_apostle parameter in the report.
Tip: for better visability set "Nested rows" to yes and "Show rows" on more than 10.