✅ Get the GCLID from a URL
Posted: Sat Feb 01, 2025 5:31 am
To retrieve the GCLID (Google Click ID) from the URL and send it to Google Analytics, create a new variable in Google Tag Manager (GTM). Follow these steps:
Go to Google Tag Manager.
Go to the "Variables" button next to your page name in the left sidebar.
Click the New button in the User Defined Variables panel.
In the Variables Settings panel, set the new variable.
Select URL as the variable type.
Select Query as the component type.
For the query key, enter "gclid".
Name the variable as desired and click the "Save" button in the top right corner.
Following these steps will create a variable in Google Tag Manager that can store the GCLID separately from the URL, which will be used to send the GCLID data to Google Analytics during a user's visit.
To send the GCLID (Google Click ID) from a variable created in Google cameroon consumer email list Tag Manager (GTM) to Google Analytics 4, you need to set up a new tag. Follow the steps below, as appropriate for your situation.
If you don't have an Analytics tag to send data to Google Analytics 4, follow these steps:
Visit Google Tag Manager and go to the Tags page by clicking the Tags button on the left sidebar.
To create a new tag, you need to click on the “New” button that appears in the Tags panel.
Configure a new tag by selecting the tag type as "Google Analytics: GA4 Configuration."
In the tagging panel, enter your "Measurement ID" (if you're not sure how to get it, see our support page for guidance).
Go to "User Properties" and tap "Add Row".
For "Property Name", enter the "GCLID" that corresponds to the custom defined user property you created earlier.
For "Value", you need to tap on the plus icon and select a GTM variable.
In the Triggers panel, select All Pages and adjust the trigger settings:
Give your new tag a name of your choice and click Save to save it.
If you already have an Analytics tag to send data to Google Analytics 4:
Click the "Tags" button in the left sidebar to go to the "Tags" page in Google Tag Manager.
Click on the existing "Google Analytics: GA4 Settings" tag to edit it.
In the Tag Settings panel, make the necessary changes to your tag settings.
Click "Field to set" and then click "Add Row".
For "Field Name", enter "GCLID" which corresponds to the custom defined user property you just created.
For "Value", you need to tap on the plus icon and select a GTM variable.
Click Save to save your tag changes.
By following the steps below, you will set up a new tag in Google Tag Manager and send the GCLID variable to Google Analytics 4 so that GCLID data will be captured and stored for analysis.
Go to Google Tag Manager.
Go to the "Variables" button next to your page name in the left sidebar.
Click the New button in the User Defined Variables panel.
In the Variables Settings panel, set the new variable.
Select URL as the variable type.
Select Query as the component type.
For the query key, enter "gclid".
Name the variable as desired and click the "Save" button in the top right corner.
Following these steps will create a variable in Google Tag Manager that can store the GCLID separately from the URL, which will be used to send the GCLID data to Google Analytics during a user's visit.
To send the GCLID (Google Click ID) from a variable created in Google cameroon consumer email list Tag Manager (GTM) to Google Analytics 4, you need to set up a new tag. Follow the steps below, as appropriate for your situation.
If you don't have an Analytics tag to send data to Google Analytics 4, follow these steps:
Visit Google Tag Manager and go to the Tags page by clicking the Tags button on the left sidebar.
To create a new tag, you need to click on the “New” button that appears in the Tags panel.
Configure a new tag by selecting the tag type as "Google Analytics: GA4 Configuration."
In the tagging panel, enter your "Measurement ID" (if you're not sure how to get it, see our support page for guidance).
Go to "User Properties" and tap "Add Row".
For "Property Name", enter the "GCLID" that corresponds to the custom defined user property you created earlier.
For "Value", you need to tap on the plus icon and select a GTM variable.
In the Triggers panel, select All Pages and adjust the trigger settings:
Give your new tag a name of your choice and click Save to save it.
Click the "Tags" button in the left sidebar to go to the "Tags" page in Google Tag Manager.
Click on the existing "Google Analytics: GA4 Settings" tag to edit it.
In the Tag Settings panel, make the necessary changes to your tag settings.
Click "Field to set" and then click "Add Row".
For "Field Name", enter "GCLID" which corresponds to the custom defined user property you just created.
For "Value", you need to tap on the plus icon and select a GTM variable.
Click Save to save your tag changes.
By following the steps below, you will set up a new tag in Google Tag Manager and send the GCLID variable to Google Analytics 4 so that GCLID data will be captured and stored for analysis.