
Google's consent mode guide notes that consent updates must be tracked on the page where they happen and before navigation. On WordPress sites, a CMP, page-builder form, redirect, or AJAX submit can break GCLID capture if the data layer order is wrong.
Use this when Google Ads lead attribution drops after adding a cookie banner, CMP, consent mode setup, or new form plugin.
Quick answer
WordPress CMP Consent Mode Debug for GCLID Capture should be handled with a narrow evidence-first workflow: test click url, set consent order, check passthrough, then verify the result before making broader changes.
What to check first
- Test the landing URL with a real GCLID or test click ID present.
- Confirm default consent is set before tags and form scripts run.
- Check whether URL passthrough is enabled and valid for same-domain navigation.
- Submit the form with consent denied, granted, and ignored.
- Compare GTM preview events against actual network requests and hidden form fields.
Diagnostic table
Use this table to keep the work practical. It connects the symptom to evidence and a verification step.
| Action | Evidence to collect | How to verify |
|---|---|---|
| Test click URL | Test the landing URL with a real GCLID or test click ID present. | The GCLID survives from landing page to form submit when consent allows it. |
| Set consent order | Confirm default consent is set before tags and form scripts run. | Denied consent does not send restricted advertising data. |
| Check passthrough | Check whether URL passthrough is enabled and valid for same-domain navigation. | GTM preview and network requests show the same consent state. |
| Submit all states | Submit the form with consent denied, granted, and ignored. | The CRM record has the expected click ID or a documented no-consent state. |
Useful command or data shape
Adapt paths, IDs, and privacy handling to the site before running commands or storing data on production.
consent_debug:
url_has_gclid: true
default_consent_before_gtm: true
url_passthrough: enabled
form_hidden_gclid: populated
submit_event: form_success
ads_data_allowed: consent_granted
Safe fix order
Do the work in a sequence that makes each result easy to prove. Stop if a step produces new evidence that changes the incident scope.
- Test click URL
- Set consent order
- Check passthrough
- Submit all states
- Compare requests
Production verification checklist
- The GCLID survives from landing page to form submit when consent allows it.
- Denied consent does not send restricted advertising data.
- GTM preview and network requests show the same consent state.
- The CRM record has the expected click ID or a documented no-consent state.
Mistakes to avoid
- Do not judge the fix by one browser or the homepage only.
- Do not delete evidence before recording usernames, file paths, timestamps, and response headers.
- Do not add a cache, security, or tracking plugin while the original problem is still unclear.
- Do not leave test users, temporary debug logs, or broad API keys active after verification.
When HandL WP should help
Bring in help when this affects leads, checkout, search visibility, malware risk, paid media reporting, or a client production site. HandL WP can trace the issue through WordPress, hosting, cache, tracking, and Search Console, then verify the workflow after the technical fix.
If this is active on a production site, debug WordPress consent mode tracking.