Capturing the gclid in a Hidden Form Field

There are 2 reasons why you’d want to capture Google Ad’s gclid for leads coming from Google Ads. The first reason is so you can see which leads came from Google Ads in your CRM. 

Note: Some CRMs like Hubspot will automatically capture it if you use their web forms. 

The 2nd reason to capture the gclid is to track Google Ad offline conversions. 

This allows you to feed your Google Ad campaign with higher quality conversion signals like offline sales conversions or marketing qualified lead conversions.

So how do you capture the gclid when a Google Ad visitor submits a web form to become a lead?

First step is to make sure you have auto-tagging enabled in your Google Ads account.

Next step is to add a hidden form field to all your lead gen forms on your website or landing page. Depending on what you’re using for your web forms, this may be easy to do or impossible. Depending on what you’re using for a web form, if it’s difficult to capture gclid or impossible then it’s definitely worth considering updating your web forms because capturing gclid is important.

Next, grab this javascript code provided by Google and add it to every page of your website. 

Make sure this bit of code (see below) matches the HTML ID for your hidden form field, as you can see you can add more than one HTML ID if you have multiple forms with hidden form fields that have different HTML IDs. Just make sure to put the ID in single quotes and a comma in between like shown here:

Once you have that all set up, you can proceed to test it all out like I show in this video below:

Free Google Ads Audit

Sign up for our newsletter and get a Free Google Ads Audit Conducted Over Zoom by a Seasoned Google Ads Expert With 10+ Years of Experience.

Just enter your email below, and we'll start delivering the goods!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.