Track UTMs in GA4 using GTM
Before you continue make sure you
you set it up UTM Simple template in GTM Basic UTM tracker setup in Google GTM
And also you created variables Creating Variables in GTM for UTM Tracking
Add Google Analytics (GA)GA4) tag and set it up
After you add the Google Analytics tag,4 click "Enable overriding settings in this tag"tag
SelectSet "MoreConfiguration Settings"Parameter andas "Fields to set"follows
And enter the following
Field Name:
and Value: campaignNamecampaign_name{{utm_campaign}}
Field Name:
and Value: campaignSourcecampaign_source{{utm_source}}
Field Name:
and Value: campaignMediumcampaign_medium{{utm_medium}}
Field Name:
and Value: campaignContentcampaign_content{{utm_content}}
Field Name:
and Value: campaignKeywordcampaign_term{{utm_term}}
Field Name:
and Value: locationpage_location{{handl_url}}
Field Name: send_page_view
and Value: true
After deployig the new container, refresh your site (make sure UTMs are appended to the URL) and confirm in realtime GA.GA4. Your traffic should be tagged with proper UTM under "Traffic Sourcecs"acquisition". Make sure you are searching by "Session campaign"