Adding Google’s Click ID (GCLID) to Google Analytics is a powerful way to better understand the behavior of people who come to your site after clicking on one of your ads. But to see GCLID data in Google Analytics requires a few steps. We’ll walk you through these in this article.
1. Create a new custom dimension in Google Analytics
Here are the steps to help get the first part of GCLID tracking set up in Google Analytics:
- Go to the Admin section of your Google Analytics profile by clicking the settings wheel at the bottom left.
- Click Custom Definitions and the Custom Dimensions in the middle column.
- Click the button to create a new Custom Dimension.
- Name the new custom dimension ‘gclid’.
- For scope, select “User”.
- Save your changes.
- Look at the table with all your custom dimensions and write down the index number for the one you just created. We’ll need this shortly for another step.
2. Use Google Tag Manager (GTM) to capture the GCLID from the URL
The GCLID is passed in the URL by Google when a user clicks on your ad. Google Analytics doesn’t natively know what to do with this so we need to tell it that the GCLID’s value should be stored in the custom dimension we just created.
There are many ways to do this, but one of the most easily repeatable ways is by using Google Tag Manager. Here we’ll tell it to grab the GCLID from the URL.
- Open your GTM container.
- In the Variables section, add a new User-Defined variable.
- For Variable Type, select ‘URL’.
- For Component Type, select ‘Query’.
- For Query Key, type in ‘gclid’.
- Leave all other settings as they are and save the variable.
3. Use Google Tag Manager to send the GCLID to Google Analytics
Now that GTM knows how to grab the GCLID from the URL, we need to send that value to Google Analytics. GTM can do this for us as well.
This is where everything comes together so the steps refer back to the things you did in the previous two instruction lists. We’ve included ample screenshots to make it as easy as possible to follow along.
- If you already use GTM to put Google Analytics on your website, go to your existing tag. Otherwise, create a new tag for Universal Analytics.
- In the tag configuration, open the dropdown for Google Analytics Settings and create a New Variable.
- Add a Custom Dimension under ‘More Settings’.
- For the index field, enter the number you wrote down from step 7 in the first instruction list on this page (create a new custom dimension in Google Analytics).
- For Dimension Value, click on the brick icon to open your available list of variables.
- Select the variable you created in the previous set of steps (use Google Tag Manager to capture the GCLID from the URL).
- Save the tag, test your GTM changes and publish them.
4. Use Google Analytics to see GCLID data
Note that the GCLID custom dimensions data will not be retroactively added into your old Google Analytics reports so you’ll have to wait a few hours for new data that does include the GCLID to appear.
As an example of a report you can now run, go to a report like ‘Behavior > Site Content > All Pages’ and in the Secondary Dimensions dropdown select ‘gclid’.
Your report will now include both the URL and the gclid.
You can download this data and using lookups in spreadsheets, start to build a more holistic view into the behavior resulting from clicks on your Google Ads.
When you add GCLID as a custom dimension in Google Analytics, Optmyzr will help you explore, build, and optimize audiences, as well as help with offline conversion import (OCI).