All articles

Server-side forwarding

After ClickHouse persistence, the API triggers asynchronous forwards.

GA4 (Measurement Protocol)

  • Always attempted when GA4_MEASUREMENT_ID and GA4_SECRET are set.
  • Maps common names (e.g. LeadFormSubmittedgenerate_lead where configured).
  • For LeadFormSubmitted, transaction_id is set to a stable per-lead token when identity can be derived (aligns with duplicate handling).

Meta Conversions API

  • Runs for eligible event types when Meta credentials exist and entry conditions match (e.g. fbclid, Facebook UTMs, or certain events such as PageView per deployment logic).
  • Uses Pixel ID + access token; optional test event code in non-prod.
  • For LeadFormSubmittedLead, the server sets event_id (stable per lead) and skips a second Meta send when that lead was already counted — see Lead form deduplication.

Google Ads (click conversions upload)

  • Uses ConversionUploadService.uploadClickConversions (REST). Runs when gclid, wbraid, or gbraid is present on the attribution payload (not Meta fbclid; not Bing msclkid — that would be a separate Microsoft Ads path).
  • gclid / wbraid / gbraid are also written onto stored event_data JSON so follow-up dedupe queries can match across events.
  • Conversion actions must be configured as resource names in G_ADS_CONVERSION_ACTIONS_JSON (per brand and event: PhoneClick, LeadFormSubmitted, EmailClick). Without this map, status is missing_gads_conversion_map.
  • For LeadFormSubmitted, uploads include orderId (stable per lead) and skip when a prior row for the same lead already reached sent_gads — see Lead form deduplication.
  • OAuth refresh failures surface as error_gads_auth; API rejections as error_gads.

Status columns on uts_events

  • meta_capi_status — Meta delivery (sent_meta, error_meta, skipped_meta_duplicate_lead, …).
  • google_capi_status — Google Ads uploads (sent_gads, error_gads, skipped_gads_duplicate_lead, …). Column name is historical (“CAPI”); it refers to Google Ads REST uploads, not GA4.

Why this matters

  • Facebook conversions (CAPI / Pixel) do not populate Google Ads offline conversion uploads unless you also have Google click identifiers—those pipelines are separate code paths.

Related