💬 RevOps Discussions


Auto Capture URL Parameters (GCLIDS in particular)

Hello - I am looking for a way to easily capture URL based parameters (such as GCLIDS) and store them in hidden fields on my HubSpot embedded forms.


Currently our Hubspot forms are set to auto capture and store UTM parameters (campaign, source, ad, etc) in hidden fields leveraging the native hubspot functionality.  I am looking to recreate this functionality with javascript embedded in GTM in the hopes of capturing additional URL params such as gCLIDs.


Does anyone have experience in this?

0 Votes
1 Réponse
Gestionnaire de communauté
Gestionnaire de communauté

Auto Capture URL Parameters (GCLIDS in particular)

Hi @dea,


Thanks for reaching out to the Community!


If your goal is to pass the GCLID value to Hubspot, it is possible to do via the cookie and using a hidden form field on your conversion form.


This external blog post describes how to add the GCLID to your cookies via javascript and add it to your forms as a hidden field. I was also able to find more about it in this Community post here.


I also wanted to invite our community members to this conversation. 

Hi @Teun@Danielle1 - Do you have any advice for @dea?

Thank you!




Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Votes