How to capture the GCLID in HubSpot
Use Attributer to capture the GCLID with each new contact in HubSpot and send it back to Google Ads as an Offline Conversion
Use Attributer to capture the GCLID in HubSpot. Simply add hidden fields to your forms, Attributer writes the GCLID into them, and they are captured by your form builder and sent to HubSpot. It even captures other lead source information (like UTM parameters, leads from organic channels, etc)
Google Ads can be a fantastic channel for generating new leads.
But if you can't track which of those leads actually become paying customers, you risk throwing money at campaigns that look good on the surface but don't deliver real results.
The good news? There's an easy fix.
In this article, we'll walk you through how to use a tool called Attributer to capture the GCLID in HubSpot, and then send it back to Google Ads to track offline conversions.
4 steps for capturing the GCLID in HubSpot
With Attributer, capturing the GCLID in HubSpot is straightforward. Here's a quick overview of how the process works:
1. Install Attributer on your website and add a hidden field
To get things rolling, sign up for a 14-day free trial of Attributer. You'll get a small piece of code to install on your website.
The exact installation steps depend on your website platform (WordPress, Webflow, Squarespace, etc), but it usually just means adding the code through your site's settings panel. You can also use Google Tag Manager if you'd prefer.
With the code installed, the next step is to add a 'GCLID' hidden field to the forms on your website. This is where Attributer will write the GCLID whenever a visitor completes a form.
You can find full setup instructions on our help site.
2. Attributer captures the GCLID and writes it into the hidden field
Every time a visitor lands on your website after clicking one of your Google Ads, Attributer grabs the GCLID from the URL and saves it in the visitor's browser. This means the GCLID is preserved even if the visitor navigates to different pages on your site, or leaves altogether and returns at a later date.
When they eventually fill out a form, Attributer automatically writes the stored GCLID into the hidden field you added.
3. GCLID is captured with each form submission
When the visitor submits the form, the GCLID that Attributer wrote into the hidden field is captured by your form tool along with all the other information the lead entered (their name, email, phone number, etc.)
3. GCLID is passed to HubSpot with each new contact
Finally, the GCLID can be sent to HubSpot alongside all the other details the lead provided in the form, such as their name, email, phone number, and more.
If you are using HubSpot forms, this will happen automatically and you will be able to see the GCLID on the contact record in HubSpot.
If you are using a third-party form tool (Gravity Forms, Jotform, Typeform, Tally Forms, etc) then you can send the GCLID to HubSpot using the built-in integration or tools like Zapier. You are likely already sending the name, email, phone, etc to HubSpot from your form tool already, so it's just a case of updating the sync to also send the GCLID.
How to send the GCLID back to Google Ads and mark it as an offline conversion
Before you're able to send the GCLID back to Google Ads, you first need to create a new conversion action in your account.
To do this, sign in to Google Ads, click Goals in the left sidebar, and navigate to Conversions. Then click the button to create a new Conversion and choose 'Offline Conversion'.
On the final screen where it prompts you to add a data source, go ahead and select the option to 'Add data source later'.
Now that the conversion action is set up in Google Ads, the next step is actually sending the GCLID back. But first, you need to figure out which stage in your sales process should count as a conversion.
It might seem logical to wait until a deal is won before sending the conversion back to Google Ads. But that can actually work against you. Google's smart bidding strategies (like Maximise Conversions, Maximise Conversion Value, or Target CPA) need roughly 50 conversions per month to perform well. So if your business closes fewer than 50 deals a month, you're better off tracking an earlier stage in your pipeline (such as when a Deal is created in HubSpot) to give Google enough data to optimise.
Once you've picked the right conversion point, head to your Zapier account and set up a new Zap. Configure the trigger to match your chosen conversion event. For example, if you want to send the offline conversion when a Deal is created in HubSpot, set that as the trigger.
Next, select Google Ads as the Action and choose 'Send Offline Conversion' as the event.
The last step is to map the GCLID from HubSpot to the GCLID field in Google Ads.
And that's it! You've now configured offline conversions in Google Ads. Before you start scaling your ad spend, it's worth testing that everything is working as expected. You can read more about how to do that here.
Why Attributer is the best way to capture the GCLID in HubSpot
You have a few options for getting the GCLID into HubSpot. So what makes Attributer the best choice?
Here's what sets it apart:
1. Remembers the GCLID as visitors browse your site
Plenty of form tools include built-in URL parameter capture, but they typically only pull whatever is in the URL at the exact moment the form gets submitted.
So if a visitor clicks your Google Ad, lands on your homepage, and then browses over to a Contact Us page to fill out a form, the GCLID is no longer in the URL and won't get picked up.
Attributer handles this differently. It saves the GCLID in the visitor's browser the moment they arrive, so it doesn't matter how many pages they visit or even if they leave your site and come back later. The GCLID always gets passed through when they submit a form.
2. Captures UTM parameters as well
Attributer doesn't just capture the GCLID. It also picks up any UTM parameters you've added to your ads.
For example, let's say you're managing the marketing for a law firm and a potential client clicks one of your Google Ads before submitting a form on your site. Depending on the UTM parameters behind that ad, Attributer could capture details like these:
- Channel = Paid Search
- Channel Drilldown 1 = Google
- Channel Drilldown 2 = Personal Injury Campaign (or whatever you named the campaign)
- Channel Drilldown 3 = Car Accident Lawyer (or whatever keyword triggered the ad)
- Channel Drilldown 4 = Free Case Review Ad (or whatever ad they clicked on)
3. Captures information on users from organic channels
In addition to paid traffic, Attributer also tracks leads who arrive through organic channels such as Organic Search, Organic Social, Referral, Direct Traffic, and more.
Keeping with the law firm example, if a lead found your site through a regular Google search, Attributer would capture something like this:
- Channel = Organic Search
- Channel Drilldown 1 = Google
- Channel Drilldown 2 = www.google.com (or whichever search engine domain they came from)
- Channel Drilldown 3 = Personal Injury Lawyer Near Me (or whatever search term they used, when available)
Wrap Up
If you want to capture the GCLID in HubSpot so you can send it back to Google Ads as an offline conversion, Attributer makes it simple.
It stores the GCLID as visitors browse around your site (or even if they leave and return days later) and automatically passes it through every time a lead fills out a form. On top of the GCLID, you'll also get detailed attribution data for all your leads (including UTM parameters, organic search info, and more), so you can see exactly where your leads and customers are coming from.
Best of all, it's free to get started and setup usually takes less than 10 minutes. Start your 14-day free trial today!
Get Started For Free
Start your 14-day free trial of Attributer today!
About the Author
Aaron Beashel is the founder of Attributer and has over 15 years of experience in marketing & analytics. He is a recognized expert in the subject and has written articles for leading websites such as Hubspot, Zapier, Search Engine Journal, Buffer, Unbounce & more. Learn more about Aaron here.