- GCLIDs are base64-like, strictly case-sensitive strings that frequently exceed 100 characters; running .toLowerCase() corrupts them permanently.
- Default 50- or 80-character Salesforce custom text fields silently truncate GCLIDs and trigger UNPARSEABLE_GCLID on every upload.
- Strip trailing query strings (&utm_source=...), whitespace, and hash fragments with a strict regex sanitizer before storing click IDs.
Exact Root Cause & Fast Fix
Why it happens: GCLIDs are base64-encoded, strictly case-sensitive strings that can exceed 100 characters. Common CRM bugs causing UNPARSEABLE_GCLID include lowercasing fields in Zapier/SQL, storing GCLIDs in a Text(50) Salesforce field (silent truncation), or appending trailing query strings like &utm_source=google.
How to fix it: Allocate ≥255 characters on all CRM click-ID fields, never run .toLowerCase() on GCLID/GBRAID/WBRAID values, and sanitize inputs with strict URL parameter parsing before storing.
| Field / Signal | Broken Pattern | Verified Production Standard |
|---|---|---|
| CRM Field Length | Salesforce Text(50) or Text(80) | Text(255) with Case-Sensitive enabled |
| String Casing | SQL LOWER(gclid) or Zapier lowercase formatter | Preserve exact raw character casing end-to-end |
| URL Parsing | Regex captures '&utm_medium=cpc' suffix | Parse with URLSearchParams + /^[A-Za-z0-9_-]{20,200}$/ |
Verification & Guard Pattern
// Strict GCLID sanitizer (preserves exact case, strips query/whitespace garbage)
function sanitizeClickId(raw) {
if (!raw || typeof raw !== "string") return "";
const cleaned = raw.trim().split(/[&\s#?]/)[0];
return /^[A-Za-z0-9_-]{20,200}$/.test(cleaned) ? cleaned : "";
}
Verify Your Payload & Primary Documentation
Paste a sanitized row from your CRM export into our free Google Ads Data Manager / OCT & Meta CAPI Payload Validator, search all 14 rejection codes in our Error Code Decoder, or read the full stack blueprint at Salesforce Opportunity & Closed-Won OCT Blueprint. Primary references: Salesforce Lead Field Configuration, Cloudflare Workers Docs, and Google Ads Data Manager API.