-
Notifications
You must be signed in to change notification settings - Fork 0
WordPress Setup
John Williams edited this page Mar 11, 2026
·
1 revision
- Form editor → Add field → Hidden
- Advanced tab → Parameter Name:
gclid - The script finds it via
[name*="gclid"]— no additional config needed
Add to your form tag:
[hidden gclid ""]
- Add field → Hidden Field
- Label:
GCLID, Name:gclid
- Add widget → Form
- Add field → Hidden
- ID:
gclid
- Form editor → Add field → Hidden
- Key:
gclid
- Copy
scripts/wordpress.js - GTM → Tags → Custom HTML → paste → Trigger: All Page Views
- The script auto-detects which plugin is rendering forms via MutationObserver
WordPress doesn't have a native Google Ads integration. Route GCLID data through your CRM:
- Using Salesforce: GCLID captured in WP form → stored in Salesforce → Data Manager imports
- Using HubSpot: GCLID captured in WP form → stored in HubSpot contact → native Google Ads integration exports
- Manual CSV upload: Export leads with GCLID column → upload as offline conversions in Google Ads
| Issue | Fix |
|---|---|
| Field not populating | Check field name attr matches the selector pattern |
| AJAX form not working | MutationObserver handles this — confirm GTM tag fires on All Pages |
| Multi-page journey loses GCLID | Confirm all pages are same domain (not subdomain) |