Setting Up Webhooks
Webhooks send order data directly from Shopify to TrackFlow's servers, ensuring reliable tracking even when browser-based tracking fails.
Why Use Webhooks?
Browser Pixel
- Can be blocked by ad blockers
- Affected by iOS 14+ restrictions
- ~60-70% accuracy
Server Webhooks
- Cannot be blocked
- Not affected by browser limitations
- ~95%+ accuracy
Step 1: Get Your Webhook URL
- Go to your store in TrackFlow
- Click the Setup tab
- Copy the Webhook URL from Step 2: Server Webhooks
Your webhook URL will look like:
https://your-domain.com/api/webhooks/shopify/your-store-idStep 2: Create Webhook in Shopify
- Go to your Shopify Admin
- Navigate to Settings → Notifications
- Scroll down to Webhooks
- Click Create webhook
- Configure the webhook:
- Event: Order creation
- Format: JSON
- URL: Paste your TrackFlow webhook URL
- Webhook API version: Latest (2024-01 or newer)
- Click Save
Important: Production URL
Make sure to use your production domain URL, not a preview or localhost URL. Webhooks from Shopify can only reach publicly accessible URLs.
Step 3: Test the Webhook
- In Shopify webhook settings, click Send test notification
- Go to TrackFlow → your store → Setup tab
- Click Check Status to verify the webhook was received
Additional Webhooks (Optional)
For more complete tracking, you can also add webhooks for:
- Checkout creation: Tracks initiated checkouts
- Cart update: Tracks add to cart events
- Order updated: Tracks order modifications
Data Sent via Webhooks
- Order value: Total order amount and currency
- Customer info: Email and phone (hashed for privacy)
- Product data: SKUs, quantities, prices
- Attribution data: Landing page URL with click IDs
Troubleshooting
Webhooks Not Arriving
- Verify the URL is publicly accessible (not localhost)
- Check that your store ID in the URL is correct
- Look for webhook failures in Shopify Settings → Notifications
Test Webhook Works but Real Orders Don't
- Ensure the webhook event is "Order creation" (not "Order payment")
- Check for any app or firewall blocking incoming requests