Analytics Telemetry User Guide
1. Executive Summary
The Analytics module is a dedicated, highly secure Cloudflare Worker responsible for ingesting, validating, and cataloging massive volumes of tracking and conversion data. It acts as the central nervous system for data, catching rich E-Commerce payloads from various third-party systems via verified webhook pipes.
2. Webhook Ingestion Engine
The module provides secure endpoints designed specifically to receive real-time data from external platforms:
- Supported Integrations: It natively catches payloads from Elevar, Shopify, Klaviyo, and Meta.
- Security Verification: Every incoming webhook is rigorously validated using HMAC SHA-256 signatures and environmental secrets (e.g.,
SHOPIFY_WEBHOOK_SECRET) to ensure malicious actors cannot spoof conversion data.
3. Queue-Based Buffering
To handle Black Friday-level traffic spikes without dropping data or overwhelming the database:
- The Analytics module heavily relies on the Cloudflare Queue architecture.
- As the Router proxy passes customer traffic, it simultaneously drops raw data-layer clicks into this queue.
- The Analytics module consumes these queues asynchronously in batches, parsing the data and securely writing it to the D1 Database logs behind-the-scenes.
4. Server-Side Attribution (CAPI/GA4)
Beyond just logging data, the Analytics module actively routes conversion signals back to the advertising networks:
- Measurement Protocol: It formats and dispatches server-side conversion events directly to Google Analytics 4.
- Conversions API (CAPI): It handles server-to-server communication with Meta, passing back critical purchase data to optimize ad bidding algorithms.
- By doing this server-side, Aegis ensures maximum data accuracy and bypasses the unreliability of client-side browser ad-blockers.