Skip to content

Guides

Capture the GCLID and other ad click IDs on every form fill.

By Santi ·

How do I get the GCLID onto HubSpot contacts?

Turn on auto-tagging in Google Ads, so every ad click lands with a gclid on the URL. Then save it into a hidden field on each HubSpot form that collects leads from ads, and check that new paid-search contacts actually carry it. HubSpot’s own Google ad click ID property may already hold it, so look at a few contacts before you build anything.

Why does the click ID matter?

An offline conversion only helps bidding once Google can tie it to an ad click. The GCLID does that directly, for conversions up to 90 days after the click. Without it, Google can match on hashed email and phone (enhanced conversions for leads), but only up to 63 days, and Google still says: “To maximize accuracy, include GCLIDs with your uploaded events whenever possible.”

The same goes for the other networks. Each has its own click ID, and each matches better with it than without.

Does HubSpot capture the GCLID on its own?

HubSpot has a default contact property for it. Its help page describes Google ad click ID as “a value that indicates a contact’s visit to your site came from a Google ad. This is automatically set by HubSpot based on a Google Click identifier (GCLID) provided by Google Ads.” Facebook click ID works the same way, “based on a URL identifier provided by Facebook Ads”.

HubSpot’s pages don’t say exactly when those fill. So check: open five recent contacts whose Original Traffic Source is Paid search and see whether Google ad click ID has a value. If most are empty, capture it yourself.

How do I add hidden fields to a HubSpot form?

  1. Create a single-line text contact property for each click ID, with the internal name equal to the URL parameter: gclid, fbclid, msclkid, rdt_cid. HubSpot fills a field from the URL only when the parameter matches the property’s internal name.
  2. In HubSpot, go to Marketing → Forms and open the form.
  3. Add the property to the form, open the field’s settings and turn on Hidden field.
  4. Click Review and update.

HubSpot says hidden fields “capture known values passed at the time of submission, such as the form field’s default value or information from a query string or page URL”. Two catches from the same page: a required field can’t be hidden, and Pre-populate fields for returning visitors may overwrite a hidden value.

The query string only works when the form sits on the page the ad click landed on. If visitors browse first and fill in a form two pages later, the gclid is gone from the URL, so a script has to keep it. Google’s help page has a sample that keeps the GCLID in the browser for 90 days and fills a hidden field, and Google recommends adding it to every page, “not just your landing pages”.

Rather not maintain that script? I build Ledion, and its capture script is free on every plan. It keeps gclid, fbclid, msclkid, rdt_cid and the rest across pages and fills them into hidden fields on your HubSpot forms. It needs Ledion installed, because the fields it fills are properties Ledion creates. Install the capture script.

Which parameter does each network use?

Network On the landing URL Good to know
Google Ads gclid, and gbraid or wbraid on some iOS traffic Needs auto-tagging. Case-sensitive
Meta fbclid Send it to Meta as fbc: fb.1. plus the time plus the fbclid. Or take it from the _fbc cookie Meta’s pixel sets
Microsoft Ads msclkid Auto-tagging is on by default
Reddit rdt_cid Reddit recommends sending it with every conversion event
LinkedIn li_fat_id Needs Enhanced conversion tracking on the Insight Tag

Meta recommends that you “always send _fbc and _fbp browser cookie values in the fbc and fbp event parameters” when you have them. fbp is Meta’s browser ID, not a click ID, so it’s worth a hidden field too.

Why isn’t the GCLID on my deal?

Because HubSpot keeps it on the contact. Google ad click ID is a contact property, and a deal reaches it only through its associated contacts. A deal workflow that sends conversions has to look up those contacts and pick the right one, or you need a deal property and a second workflow that copies the value across.

Ledion’s Send conversion step does the lookup in deal workflows: it reads click IDs, email and phone from the deal’s associated contacts and picks one contact per network.

What does Safari do to click IDs?

Apple’s Link Tracking Protection removes tracking information from links in Messages, Mail and Safari Private Browsing. Tests by Able CDP and PPC Land found that it strips gclid and fbclid there, while gbraid, wbraid and UTM parameters get through, and that regular browsing still passed them in Safari 26 testing. Safari 27 shipped on September 14, 2026, and its release notes don’t mention a change to link tracking.

Safari also limits what scripts can keep. WebKit “deletes all cookies created in JavaScript and all other script-writeable storage after 7 days of no user interaction with the website”, and caps cookies that scripts create on a landing page with a decorated link at 24 hours.

So in Safari, the click ID is safest when the visitor fills in a form on the visit that came from the ad. That’s one reason to send hashed email and phone along with the click ID.

Google’s help page says: “You should make sure that you’re observing local regulations regarding cookie consent.” If your site waits for consent before setting advertising cookies, make your capture script wait too. Ledion’s script has a data-consent="wait" option for that (consent in the setup guide).

How do I check my coverage?

Build a HubSpot contact report:

  1. Filter to contacts created in the last 30 days whose Original Traffic Source is Paid search.
  2. Break it down by whether Google ad click ID, or your own GCLID property, is known.

Paid search covers Google and Microsoft together, because HubSpot’s drill-down for it is the utm_campaign value, not the network. For Meta, LinkedIn and Reddit, filter on Paid social and use Original Traffic Source Drill-Down 1, which HubSpot fills with the social media site.

Ledion’s Tracking health page does this per network, and names the fix for a low number (Read Tracking health). How each network uses the click IDs: Google Ads, Meta, Microsoft Ads.

I'm Santi. I build Ledion, a Send conversion step for HubSpot workflows. Something wrong or out of date? Email santi@ledion.io.

Questions

Do I need the GCLID if I send email and phone?

It helps. Google matches hashed email and phone up to 63 days after the click, against 90 days with a GCLID, and says: “To maximize accuracy, include GCLIDs with your uploaded events whenever possible.”

What about MSCLKID?

Microsoft adds it to the landing page URL when auto-tagging of Microsoft Click ID is on, which Microsoft says is the default (Settings > Account level options). Save it in its own hidden field, the same way as the GCLID.

Does the capture script need Ledion?

Yes. The hidden fields it fills are the properties Ledion creates when you install it, so without Ledion there’s nothing for it to fill. Every plan includes it, Free too. Without Ledion, Google’s help page has a sample script for the GCLID alone.

Sources: 16 pages, checked

Send each deal's real amount to your ad platforms.

Ledion adds a Send conversion step to HubSpot contact and deal workflows. It sends the record's real amount to Google Ads, Meta, Microsoft Ads and Reddit, and each network's result comes back to the workflow. Works with HubSpot Professional and Enterprise plans that include workflows.

I'm onboarding the first companies one at a time. You get a direct install link and a 20-minute setup call if you want one. First 10 companies: Pro free, with no card, until Ledion is listed on the HubSpot App Marketplace, then $79 a month instead of $129 for as long as you stay.