This guide will explain how to save the GCLID parameter of a user’s Google Ads click in GA4. There are many ways to save the GCLID parameter, and storing it in GA4 reports will make it easier for us to analyze advertising data more comprehensively.
What is GCLID?
GCLID is Google’s click identifier and is a key element to successfully tracking Google advertising performance. It associates users with the clicked ads, ad groups, campaigns, keywords, etc.
Why should GCLID be stored in GA4?
The core function of the GCLID parameter is to measure the conversion performance of Google Ads ads, and GA4 can successfully identify Google Ads traffic in its attribution reports.
GA4 has its own attribution path report, which will show you how various channels work together if a user visits the website multiple times from multiple different sources before converting. Collecting the GCLID parameter as a user-scoped custom dimension in GA4 means that once the user is associated with the GCLID, you will know that they came in through Google Ads, and any future conversions can be linked to Google Ads.
How to save GCLID in GA4 via Google Tag Manager
First, you need to enable auto-tagging in Google Ads. When a user clicks your ad and enters the website, the GCLID parameter will be appended to the URL.
We can use Google Tag Manager to capture the value of any URL parameter and send it to any data collection point. In this case, we will send the GCLID parameter to GA4 reports.
- In GTM, create a new variable – select URL for variable type, select query for component type, and enter gclid for query key
Set up GA4 tag event code: Create a new event called “gclid_pickup” and send the new variables above as user properties to GA4.
Trigger for this tag: The page URL contains “gclid”, so it will only trigger if there is a gclid parameter in the URL.
The final step is to create a new user-scoped custom dimension within GA4. Without this you will not see gclid data reported in your GA4 reports.