Technology

How an event moves through EVENTS Gateway

A compact map for marketers who still want the real system: capture, queue, identity, consent, attribution, routing, transformations, delivery, and feedback. The internal global_ga4 mirror is intentionally excluded here, so the destination view represents merchant-configured outputs.

Event Journey

One event stream, seven working layers.

This is the operational path from customer action to destination delivery, compressed into one view.

  1. 01 Signal capture

    Every customer action is collected once, then reused across reporting and destinations.

    Browser SDKShopify Web PixelSource webhooksServer/API eventsManual tests
  2. 02 Edge ingest

    The collector accepts the hit, resolves site identity, attaches visitor/session context, and loads Tag Manager snippets when needed.

    /i//i/identifyCollector CORSIP activity guardTag Manager loader
  3. 03 Queue and ledger

    Events move through Cloudflare Queues while durable storage keeps the operational trail available.

    INGEST_QUEUEEVENTS_QUEUER2 raw ledgerKV cacheDurable Objects
  4. 04 Event intelligence

    Runtime code turns raw payloads into canonical events with consent, identities, click IDs, traits, and counters.

    Event schemaDeduplicationIdentity traitsConsent flagsTraffic counters
  5. 05 Decision layers

    The active site configuration decides whether the event should be enriched, attributed, transformed, sampled, or routed.

    RoutesTransformationsSamplingAttribution LayerSource context
  6. 06 Delivery engine

    The forwarder dispatches each configured target and records success, latency, payload, response, and error context.

    Managed dispatchWebhook dispatchDelivery attemptsRetriesReplay jobs
  7. 07 Marketer view

    Marketers see cleaner destinations, attribution paths, identity quality, and delivery health instead of a black box.

    DestinationsSourcesAttributionsIdentitiesEvent delivery
D1 control plane Sites, keys, routes, transformations, destinations, source integrations, identities, attribution tables, delivery attempts, jobs, billing, and Shopify state.
R2 event ledger Raw event and operational records can be kept outside the hot path for export, audit, backfill, and replay workflows.
KV runtime cache Published routing and runtime artifacts are cached so collection and routing stay fast at the edge.
Durable Objects Visitor state and IP activity state help identity continuity, abuse resistance, and session-level behavior.
Queues Ingest and delivery queues decouple the site experience from downstream API latency and temporary platform failures.
Signal Flow

The event does not stop at collection. It keeps moving.

A marketer can think of every signal as a packet that is captured once, enriched, routed, delivered, and then made visible again in reporting.

Inputs

Browser SDK, Shopify pixel, source webhooks, API events, and tests create the first signal.

PageViewPurchaseLeadKlaviyo click

Edge collector

The edge accepts the hit, resolves site context, visitor/session IDs, identity response, and Tag Manager runtime.

/i//i/identifyCORSIP guard

Queue and ledger

The event leaves the storefront quickly and moves through durable queue and ledger rails.

INGEST_QUEUER2 ledgerKVDurable Objects

Enrichment

Runtime layers normalize schema, consent, identity traits, click IDs, source context, and attribution evidence.

SchemaConsentIdentityAttribution

Routing

Published routes, transformations, sampling, and destination settings decide where the event is allowed to go.

RoutesTransformsSamplingConsent rules

Delivery

The forwarder sends destination payloads and records latency, status, response, failures, retries, and replay context.

EVENTS_QUEUEManaged dispatchAttemptsReplay

Marketer view

Marketers see Sources, Destinations, Attributions, Identities, Event delivery, and health signals.

MetaGoogleTikTokWebhooks
D1R2KVDurable ObjectsQueues
Purchase signal Lead signal Identity evidence Retry or replay context
Marketing Payoff

The technical layers exist to protect campaign decisions.

The stack is built so marketers can spend, test, and optimize from a cleaner shared event truth.

Cleaner optimization signals

Ad platforms receive canonical Purchase, Lead, checkout, catalog, and lifecycle events with value, currency, IDs, consent, and match fields.

Attribution that explains the path

Touchpoints, conversions, models, confidence, and delivery summaries show why a campaign gets credit, not just that a conversion happened.

Less tagging sprawl

One event layer feeds pixels, server APIs, CRM, analytics, webhooks, partner tools, and source webhooks without rebuilding tracking per tool.

Operational confidence

Delivery attempts, errors, queues, replay, exports, and jobs make the marketing system observable when platforms reject or delay events.

Inputs

Sources and capture points.

These are the inbound systems and customer touchpoints that create usable marketing signals.

Runtime Layers

What the code does before delivery.

Each layer turns raw activity into a signal that can be trusted, attributed, and routed.

LayerCode SurfaceMarketer Gain
Collectorraw collector, collector worker, tracker SDK, Shopify pixelCaptures browser, checkout, source, and server signals as first-party events.
Identityvisitors, identities, identity traits, visitor stateConnects sessions, forms, customer IDs, hashed contact fields, and consent into one usable profile.
Attributiontouchpoints, conversions, links, models, results, settingsShows campaign influence, confidence, winner model, path summary, and unattributed gaps.
Routingroutes, route versions, transformations, sampling, consent requirementsControls which events reach Meta, Google, TikTok, CRM, analytics, webhooks, and other tools.
DeliveryEVENTS_QUEUE, forwarder, managed destinations, delivery_attemptsTracks accepted, failed, retryable, and replayable delivery for every downstream destination.
Operationsoperation_jobs, counters, billing, Shopify app state, data explorerKeeps usage, cost, replay, export, app install, and health workflows visible.
Delivery

Configured destinations receive the final event.

Events are delivered only to configured destinations and routes. This list intentionally excludes the internal global_ga4 delivery path.