Book a call

Home › Guides › Fix Google Data Manager API (events:ingest) Batch Rejection Errors

Google Data Manager API v1 · Troubleshooting Guide

Fix Google Data Manager API (events:ingest) Batch Rejection Errors

Why a single malformed CRM row can reject an entire events:ingest batch of up to 2,000 events, the exact fix for all 6 validation traps, and the pre-flight quarantine pattern that stops silent conversion loss.

Drafted with AI help, every technical rule verified on 2026-11-30

Why batches fail all at once: Legacy Google Ads API uploads often relied on partialFailure: true to skip bad rows. Google Data Manager API v1 (POST /v1/events:ingest) enforces strict batch-level validation: one malformed event can reject the entire payload (up to 2,000 events). You must validate, normalize, and quarantine bad rows before hashing and POSTing.

Still migrating off UploadClickConversions after hitting CUSTOMER_NOT_ALLOWLISTED? Start with our CUSTOMER_NOT_ALLOWLISTED 2026 migration guide.

1. Quick reference: the 6 batch-rejection traps

TrapStrict ruleFailure mode
1. Non-E.164 phone^\+[1-9]\d{7,14}$ before SHA-256 HEXValidation error or non-matching hash
2. Un-trimmed / uppercase emailLOWER(TRIM(email)) + Gmail dot strip before SHA-256 HEXSilent Enhanced Conversions match drop
3. Naive timestampRFC 3339 / ISO-8601 with Z or ±HH:MMWhole-batch schema rejection
4. Bad value or currencyClean float conversionValue + ^[A-Z]{3}$ currencySchema error or broken Target ROAS
5. Duplicate transactionIdDeterministic unique key per (record, action)Duplicate conflicts or inflated counts
6. >90-day GCLID expiryDATE_DIFF(event, click, DAY) <= 90Dropped click-ID attribution

2. Exact fix for each rejection trap

Trap 1

Non-E.164 phone numbers before SHA-256 HEX

What breaks: Spaces, dashes, parentheses, or missing country codes (like (415) 555-0142 or 44 20 7946 0114) fail validation or hash to values Google can never match.

Trap 2

Un-trimmed or uppercase email before SHA-256 HEX

What breaks: " Elena.Vance@NorthPeak.io " produces a completely different SHA-256 digest than "elena.vance@northpeak.io", silently zeroing out Enhanced Conversions matching.

Trap 3

Missing ISO-8601 / RFC 3339 timezone offset

What breaks: CRM exports often output naive timestamps like 2026-10-14 09:22:00 without an offset. events:ingest requires explicit RFC 3339 eventTimestamp.

Trap 4

Missing or non-numeric conversionValue or invalid ISO-4217 currency

What breaks: Formatted strings like "$12,000", null values, or lowercase/blank currency codes (usd) trigger schema rejections or distort value-based bidding.

Trap 5

Duplicate transactionId

What breaks: Retrying a failed job or running overlapping incremental syncs with the same CRM ID causes duplicate conversion conflicts or inflated Smart Bidding counts.

Trap 6

>90-day GCLID window expiry

What breaks: B2B sales cycles often close 95–180 days after the ad click. Google Ads drops click-ID attribution past the 90-day GCLID window.

3. Pre-flight quarantine architecture

Separate validation from transmission. Never let raw CRM exports go straight into POST /v1/events:ingest:

CRM Qualified Stage View (HubSpot / Salesforce / Pipedrive)
        │
        ▼
[1. Pre-Flight Validator View]  ──►  Failed rows  ──►  dm_api_quarantine (alert if >5% of batch)
        │
        ▼ (Clean rows only, deduplicated by transactionId, chunked <= 2,000 events)
[2. Dry Run: POST /v1/events:ingest with validateOnly: true]
        │
        ▼ (0 schema errors)
[3. Live Upload: POST /v1/events:ingest with validateOnly: false]
        │
        ▼
[4. Log accepted transactionIds + Weekly CRM-vs-Ads reconciliation]

Warehouse pre-flight split pattern (BigQuery SQL)

Tag every candidate row with a quarantine_reason before hashing. Only rows where quarantine_reason IS NULL move to the uploader:

WITH normalized AS (
  SELECT
    CONCAT(crm_record_id, '_', stage_slug) AS transaction_id,
    FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M:%SZ', qualified_at) AS event_timestamp,
    LOWER(TRIM(email)) AS clean_email,
    REGEXP_REPLACE(phone, r'[^0-9+]', '') AS clean_phone,
    SAFE_CAST(conversion_value AS FLOAT64) AS conversion_value,
    UPPER(TRIM(currency)) AS currency,
    gclid,
    DATE_DIFF(DATE(qualified_at), DATE(created_at), DAY) AS lag_days
  FROM `project.dataset.crm_qualified_stages`
  QUALIFY ROW_NUMBER() OVER (
    PARTITION BY CONCAT(crm_record_id, '_', stage_slug)
    ORDER BY qualified_at DESC
  ) = 1
),
validated AS (
  SELECT
    *,
    CASE
      WHEN event_timestamp IS NULL THEN 'MISSING_TIMESTAMP'
      WHEN conversion_value IS NULL OR conversion_value <= 0 THEN 'INVALID_VALUE'
      WHEN NOT REGEXP_CONTAINS(currency, r'^[A-Z]{3}$') THEN 'INVALID_CURRENCY'
      WHEN gclid IS NOT NULL AND lag_days > 90 THEN 'GCLID_EXPIRED_GT_90D'
      WHEN gclid IS NULL
        AND NOT REGEXP_CONTAINS(IFNULL(clean_email, ''), r'^[^\s@]+@[^\s@]+\.[^\s@]{2,}$')
        AND NOT REGEXP_CONTAINS(IFNULL(clean_phone, ''), r'^\+[1-9]\d{7,14}$')
      THEN 'NO_VALID_IDENTIFIER'
      ELSE NULL
    END AS quarantine_reason
  FROM normalized
)
SELECT * FROM validated
WHERE quarantine_reason IS NULL
  AND transaction_id NOT IN (SELECT transaction_id FROM `project.dataset.sent_events_log`);

Want to test a CRM export before writing SQL? Test your CRM CSV in your browser — zero rows uploaded, or run our open-source Python pre-flight validator on GitHub (MIT license) in CI/CD.

4. Frequently asked questions

Does Google Data Manager API events:ingest support partialFailure like the legacy Google Ads API?

No. events:ingest enforces strict request-level schema and format validation. One malformed event in a request of up to 2,000 events can reject the entire batch, which is why you must quarantine invalid rows before building the JSON payload.

What happens if a CRM lead has a valid email but a malformed phone number?

Do not hash and send the malformed phone number. Strip the invalid phoneNumber entry from userData.userIdentifiers, keep the valid normalized SHA-256 emailAddress (and gclid if within 90 days), and log the phone formatting issue to your quarantine table.

Should I send HEX or BASE64 for SHA-256 hashes in events:ingest?

Either HEX or BASE64 works as long as every hash in the request matches the top-level encoding field. Lowercase 64-character HEX is easier to inspect and debug in BigQuery and Python pipelines.

How should B2B teams handle deals that close more than 90 days after the ad click?

Google Ads drops click-ID attribution past the 90-day GCLID window. Split rows where lag_days exceeds 90 out of your primary GCLID batch, and optimize bidding on an earlier qualified CRM milestone such as SQL or Booked Demo that happens inside 90 days. Never alter timestamps to fake a shorter window.

Engineering tools & related guides

Stop losing batches silently in Google Data Manager API

Want us to audit your CRM export, wire up pre-flight quarantine in your BigQuery project, and reconcile uploaded conversions weekly?