How to Add Google Click ID (GCLID) to Google Analytics?

On This Page

    What Is GCLID?

    The GCLID, or Google Click Identifier, is an essential component for tracking your Google Ads campaigns. By using GCLID, you can collect information and understand behaviors of people who visit your site by clicking on your advertisement. The GCLID is found after your URL as a long slice of code. In fact, the click identifier is not unique to Google. There are also Facebook, Microsoft and more versions of this -known as FBCLID and MSCLID etc.

    There are some actions that need to be taken in order to collect the GCLID in Google Analytics. In this article, we will talk about how to add Google Click ID (GCLID) to Google Analytics.

    How To Add Google Click ID (GCLID) To Google Analytics Universal?

    Create New Custom Dimension On Google Analytics Universal

    Our first step is to get Google Analytics ready to collect GCLID data. We will need a new “custom dimension” for this. You can get Google Analytics ready to collect GCLID data by following the steps below.

    1. Visit Google Analytics home page (https://www.analytics.google.com)
    2. Navigate to your “Admin Page” by clicking the button on the bottom left.
    3. On the left panel, select your account, then select your property on the middle panel.
    4. Click on “Custom Definations” and then “Custom Dimensions”.
    5. Click the “+ New Custom Dimension” button.
    6. Name your new custom dimension as “gclid” and select “User” for scope.
    7. Click the “Create” button to create your new custom dimension.
    8. After you create custom dimension, look at the table of your all custom dimensions and note the “Index” of the custom dimension you recently created (gclid). We will need to use that on the next steps.

    Create New Variable On Google Tag Manager (GTM) To Capture GCLID From URL

    When a user clicks on your ad, Google adds a GCLID to the end of the URL. Unfortunately, Google Analytics does not collect this information by default. We’ll have to somehow separate the GCLID from the URL and send it to Google Analytics. What we need here is Google Tag Manager. With a variable we will create in Google Tag Manager, we can easily do this and send the GCLID to Google Analytics to store.

    1. Go to Google Tag Manager.
    2. Navigate to the “Variables” page by clicking “Variables” button on the left sidebar.
    3. Click the “New” button on the User-Defined Variables panel.
    4. Click the “Variable Configuration” panel to configure your new variable.
    5. Choose the “URL” for variable type.
    6. Choose the “Query” for component type.
    7. Type “gclid” for query key.
    8. Name your variable as you wish and click “Save” button on the top right corner.

    After applying the steps above, Google Tag Manager will be able to separate GCLID from URL to store it in variable. Now, all we have to do is send this variable to Google Analytics on user visits.

    Create New Tag On Google Tag Manager To Send GCLID To Google Analytics Universal

    In the previous steps, we separated the GCLID from the URL and stored it as a variable. However, this variable is still only available in Google Tag Manager, not in Google Analytics. In this step, we will add a new tag to Google Tag Manager to send this variable in Google Analytics.

    If You Don’t Have An Analytics Tag That You Use To Send Your Data To Google Analytics Universal

    1. Navigate to the “Tags” page by clicking the “Tags” button on the left sidebar.
    2. Click on “New” on the tags panel to create new tag.
    3. Click on the “Tag Configuration” panel to configure your new tag.
    4. Select “Google Analytics: Universal Analytics” as tag type.
    5. Click on the “Google Analytics Settings” dropdown and select “New Variable”.
    6. Type your “Tracking ID” on variable configuration panel .
    7. Click on the “More Settings” then “Custom Dimensions”.
    8. Click on the “+ Add Custom Dimension” button.
    9. For “Index”, type the index number of your custom dimension you noted on previous steps.
    10. For “Dimension Value”, click the plus button and choose the GTM Variable you created for GCLID on previous steps.
    11. Click on “Save” to save your Variable Configuration.
    12. Click on the “Triggering” panel to adjust trigger for this tag.
    13. Select “All Pages
    14. Name new tag as you wish and click “Save” to save your new tag.

    If You Already Have An Analytics Tag That You Use To Send Your Data To Google Analytics Universal

    1. Navigate to “Tags” page by clicking “Tags” button on the left sidebar.
    2. Click on your existing “Google Analytics: Universal Analytics” tag to configure.
    3. Click on info icon next to your Google Analytics Settings.
    4. Click on “More Settings” then “Custom Dimensions”.
    5. Click on “+ Add Custom Dimension” button.
    6. For “Index”, type the index number of your custom dimension you noted on previous steps.
    7. For “Dimension Value”, click the plus button and choose the GTM Variable you created for GCLID on previous steps.
    8. Click on “Save” to save your Variable Configuration.
    9. Click on “Save” to save changes on tag.

    How To Add Google Click ID (GCLID) To Google Analytics 4?

    Create New Custom Definition On Google Analytics 4

    Our first step is to get Google Analytics 4 ready to collect GCLID data. We will need a new “custom definition” for this. You can get Google Analytics 4 ready to collect GCLID data by following the steps below.

    1. Visit Google Analytics home page (https://www.analytics.google.com)
    2. Navigate to your “Configure” page by clicking the button on the left panel.
    3. Click on “Custom Definations”.
    4. Click on “+ Create custom dimensions” button.
    5. Select “User” for scope and type “gclid” for User property.
    6. Name your dimension as “Google Click ID”.
    7. Click on the “Save” button to create your new custom dimension.

    Create New Variable On Google Tag Manager (GTM) To Capture GCLID from URL

    When a user clicks on your ad, Google adds a GCLID to the end of the URL. Unfortunately, Google Analytics does not collect this information by default. We’ll have to somehow separate the GCLID from the URL and send it to Google Analytics. What we need here is Google Tag Manager. With a variable we will create in Google Tag Manager, we can easily do this and send the GCLID to Google Analytics to store.

    1. Go to Google Tag Manager.
    2. Navigate to “Variables” page by clicking “Variables” button on the left sidebar.
    3. Click on the “New” button on the User-Defined Variables panel.
    4. Click on the “Variable Configuration” panel to configure your new variable.
    5. Choose “URL” for variable type.
    6. Choose “Query” for component type.
    7. Type “gclid” for query key.
    8. Name your variable as you wish and click “Save” button on the top right corner.

    After following the steps above, Google Tag Manager will be able to separate GCLID from URL to store it in variable. Now all we have to do is send this variable to Google Analytics on user visits.

    Create New Tag On Google Tag Manager To Send GCLID To Google Analytics 4

    In the previous steps, we separated the GCLID from the URL and stored it as a variable. However, this variable is still only available in Google Tag Manager, not in Google Analytics. In this step, we will add a new tag to Google Tag Manager to send this variable in Google Analytics.

    If You Don’t Have An Analytics Tag That You Use To Send Your Data To Google Analytics 4

    1. Navigate to “Tags” page by clicking “Tags” button on the left sidebar.
    2. Click on the “New” tab on the tags panel to create new tag.
    3. Click on the “Tag Configuration” panel to configure your new tag.
    4. Select “Google Analytics: GA4 Configuration” as tag type.
    5. Type your “Measurement ID” on Tag Configuration panel. (Don’t know how to get Measurement ID? Visit https://support.google.com/analytics/answer/9539598?hl=en to learn.)
    6. Click on “User Properties” and then “Add Row”.
    7. For “Property Name”, type the “gclid” which is the user property of the custom definition we created earlier.
    8. For “Value”, click the plus button and choose the GTM Variable you created for GCLID on previous steps.
    9. Click on the “Triggering” panel to adjust trigger for this tag.
    10. Select “All Pages
    11. Name new tag as you wish and click “Save” to save your new tag.

    If You Already Have An Analytics Tag That You Use To Send Your Data to Google Analytics 4

    1. Navigate to “Tags” page by clicking “Tags” button on the left sidebar.
    2. Click your existing “Google Analytics: GA4 Configuration” tag to configure.
    3. Click on the Tag Configuration Panel to edit your Tag Configuration.
    4. Click on “User Properties” and then “Add Row”.
    5. For “Property Name”, type the “gclid” which is the user property of the custom definition we created earlier.
    6. For “Value”, click the plus button and choose the GTM Variable you created for GCLID on previous steps.
    7. Click on “Save” to save changes on tag.

    You Are All Set!

    After the completing steps above, you will be able to see GCLID on Google Analytics reports. Note that, GCLIDs will not be retroactively added to your old reports. You can see how the whole process works as presented below.

    More Similar Posts

    Menu