Skip to content

Capture the GCLID in WordPress Forms

When a visitor clicks a Google Ads link and later submits a WordPress form, the click identifier in the URL can disappear before the form is reached. This guide explains how to keep that identifier, place it in a hidden field, and pass it to a CRM so it can be used for offline conversion reporting.

What the GCLID is and why it gets lost

The GCLID is a parameter appended to a landing page URL by Google Ads. If a visitor lands on one page and then navigates to a contact page before submitting a form, the original URL parameter is no longer present. A capture method that only reads the current URL at submission time will therefore miss the identifier. The practical requirement is to read the GCLID on arrival, retain it for the visit, and write it into the form when the visitor submits.

Three-step setup for WordPress forms

The setup has three stages. First, install the capture script on the site and add a hidden field named GCLID to each form. In WordPress, paste the snippet into the site header using a plugin such as WPCode, or add it through the theme's settings. Second, the script reads the GCLID from the landing URL and stores it in the visitor's browser; when the form is submitted, the stored value is written into the hidden field. Third, the form submission carries the GCLID alongside the lead's name, email, and other details, where it can be viewed in the form entries and forwarded to a CRM or spreadsheet.

Field and control map

Use this map to check each link in the chain before troubleshooting:

Sending the GCLID back to Google Ads as an offline conversion

In Google Ads, open Goals, then Conversions, and create a new conversion action. Choose Offline Conversion as the type. On the data source screen, select the option to add a data source later. The conversion action must exist before any offline event can be attributed to it.

Choosing the trigger point

The moment at which the GCLID is sent back to Google Ads affects both signal quality and volume. Sending only when a deal closes gives a clean revenue signal but may produce too few events for smart bidding strategies such as Maximise Conversions, Maximise Conversion Value, or Target CPA, which typically need at least 50 conversions per month to perform well. If closed deals are below that level, an earlier event such as a qualified lead or a newly created deal in the CRM can provide enough volume while still reflecting a meaningful sales step.

Automating the upload with Zapier

Create a Zap whose trigger matches the chosen moment, for example a new deal created for a contact. Set Google Ads as the action app and choose Send Offline Conversion as the event. Map the GCLID from the CRM record, or wherever it is stored, to the corresponding field in the action. Test the Zap before increasing ad spend so that a mapping error does not silently discard conversion data.

What else can be captured alongside the GCLID

A capture script can also record UTM parameters and organic source details. For a fencing company running a residential campaign, a paid search submission might carry Channel = Paid Search, Channel Drilldown 1 = Google, Channel Drilldown 2 = Residential Fencing Campaign, Channel Drilldown 3 = Timber Fencing Sydney, and Channel Drilldown 4 = Free Quote Ad. A visitor arriving through a regular search might instead show Channel = Organic Search, Channel Drilldown 1 = Google, Channel Drilldown 2 = the search engine domain, and Channel Drilldown 3 = the search term where available. These values let a CRM report group leads by campaign and source rather than by click alone.

Troubleshooting: where the GCLID can go missing

A missing GCLID usually has one of three causes. If the landing URL never contained the parameter, there is nothing to capture. If the parameter was present but the hidden field is empty on submission, the script may not be loading on the form page or the field name may not match. If the hidden field contains a value but the CRM record does not, the form-to-CRM integration or the automation mapping is the likely fault. Check each stage in order rather than changing several settings at once.

GCLID field and control map
StageWhat to checkWhere it appears
Landing URLGCLID parameter present on the ad landing pageBrowser address bar
Browser storageCapture script loaded and storing the valueVisitor's browser
Form hidden fieldField named GCLID exists on the formWordPress form builder
Form submissionGCLID visible in the entry alongside name and emailForm entries or email notification
CRM recordGCLID stored on the contact or dealCRM field
AutomationGCLID mapped to the offline conversion actionZapier or Make step

This map describes the sequence of checks; it does not assert that any particular plugin or CRM is configured in a given installation.

Frequently asked questions

Does the GCLID survive if the visitor browses other pages before submitting?

Yes, when the capture method stores the value in the browser. The identifier is read on arrival and written into the hidden field at submission, so intermediate navigation does not remove it. A method that reads only the current URL at submission time will lose the value once the visitor leaves the landing page.

Which WordPress form plugins can use a GCLID hidden field?

The hidden-field approach works with common WordPress form plugins, including Gravity Forms, WPForms, and Fluent Forms. The field must be named GCLID so the capture script can write into it.

When should the offline conversion be sent to Google Ads?

Send it at a point that produces enough volume for smart bidding. Closed deals give the cleanest revenue signal, but if that volume is below roughly 50 conversions per month, an earlier qualified-lead or new-deal event may perform better.

Can the same setup capture UTM parameters and organic source data?

Yes. Alongside the GCLID, the capture script can pass channel and drilldown values for paid search, organic search, organic social, referral, and direct traffic, so the CRM record shows more than the click identifier alone.