Key facts
  • 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

Diagnostic Summary

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 / SignalBroken PatternVerified Production Standard
CRM Field LengthSalesforce Text(50) or Text(80)Text(255) with Case-Sensitive enabled
String CasingSQL LOWER(gclid) or Zapier lowercase formatterPreserve exact raw character casing end-to-end
URL ParsingRegex captures '&utm_medium=cpc' suffixParse 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.

Related Error FAQs

Can we recover a GCLID that was already lowercased or truncated in Salesforce or HubSpot?
No: lowercasing or truncating a base64-encoded GCLID destroys information irreversibly. For historical rows with corrupted GCLIDs, upload via Enhanced Conversions for Leads using SHA-256 email and E.164 phone instead, and fix the CRM field immediately for future leads.
Does double URL-encoding cause UNPARSEABLE_GCLID?
Yes. Passing a percent-encoded value like %20 or %26 into the API payload triggers UNPARSEABLE_GCLID. Always decode once with URLSearchParams and validate strictly against [A-Za-z0-9_-].
Why do Calendly or HubSpot hidden-field redirects sometimes append extra text to GCLID?
Poorly written regex parsers on landing pages often grab everything after 'gclid=' to the end of the URL instead of splitting on '&' or '#'. Use the browser's built-in URLSearchParams API instead of string slicing.