Comprehensive Analytics Testing Guide Testing an asynchronous, highly-secure analytics pipeline can be tricky because most of these webhooks rely on complex cryptographic hashes that are nearly impossible to manually simulate with cURL commands.
Because we engineered the security to be bulletproof against spoofing, the absolute best way to verify the pipeline is by triggering Native Test Events directly from the vendor dashboards.
Here is exactly how to verify every single link in the telemetry chain from start to finish:
*Stage 1: Triggering Inbound Traffic
- The Proxy Router (Ad Clicks) You don't need a vendor for this. You can fake an ad-click natively in your own browser using your active npm run dev:router configuration!
Open up a fresh browser tab. In the URL bar, type: http://localhost:8787/?_test_channel=meta&utm_campaign=test_run Hit enter. The proxy will seamlessly redirect you to the destination Shopify page, but silently fire an asynchronous telemetry ping to the TELEMETRY_QUEUE in the background.
Shopify Webhooks Open the Shopify Admin Dashboard -> Settings -> Notifications -> Webhooks. Locate your specific webhook configuration. Click the "Send test notification" button. Shopify will generate an encrypted HMAC-SHA256 payload mimicking a real order and blast it at your worker.
Meta Webhooks Open your Meta Developer App Dashboard. Navigate to your Webhooks products page. Once your Webhook URL is actively verified (via the GET challenge handshake), click the "Test" button next to your specific field (e.g. leadgen). Facebook will blast a securely hashed X-Hub-Signature mock payload at your endpoint.
Elevar & Klaviyo Navigate directly to your respective Outbound Destination Webhook menus in either application. Both platforms feature native "Send Test Event" buttons that will cryptographically construct and fire mock metrics. Stage 2: Verifying The Pipeline (Did it work?) Once you've fired the missiles using the steps above, you can actively trace the data cascading through your infrastructure to ensure it was properly ingested and wasn't silently dropped.
Step 1: Check the Origin Terminal Jump into the terminal window currently running npm run dev:analytics. If the cryptographic signature matched properly, you will instantly see a standard console.log output confirming it survived the checkpoint (e.g. Processed Authentic Shopify Webhook).
WARNING
If the passwords mismatched, the terminal will instantly log a red HMAC Mismatch. Intruder Blocked error and sever the connection.
Step 2: Check the Cloudflare Queue Buffers Because the payloads use Cloudflare Queues (TELEMETRY_QUEUE), they don't immediately crash into the database. They sit in a lightning-fast memory buffer.
Look at your npm run dev:analytics terminal again. You should see a batch log indicating the Background Queue Consumer successfully executed its INSERT algorithm onto the D1 database and purged the memory. Step 3: View the Raw Database Dump We explicitly built an API endpoint to view the unadulterated raw logs prior to aggregation precisely for testing.
Open your browser. Navigate directly to: http://localhost:8788/api/analytics/raw (Ensure npm run dev:admin is running!). A massive JSON array will appear. Hit CTRL+F and search for the specific source you just tested (e.g., shopify or google). The payload will be visibly printed in the array! Step 4: Visual Aggregation If the data safely arrived in the Raw Logs, the final step is ensuring the UI metrics engine caught it correctly.
Log into your Admin Dashboard (http://localhost:8788). Navigate to the 📈 Analytics tab. The Chart.js graphs and metric grids should vividly reflect the new events immediately jumping your real-time total metric counts natively on the glass grid!