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

  1. Go to your store in TrackFlow
  2. Click the Setup tab
  3. Copy the Webhook URL from Step 2: Server Webhooks

Your webhook URL will look like:

https://your-domain.com/api/webhooks/shopify/your-store-id

Step 2: Create Webhook in Shopify

  1. Go to your Shopify Admin
  2. Navigate to Settings → Notifications
  3. Scroll down to Webhooks
  4. Click Create webhook
  5. Configure the webhook:
    • Event: Order creation
    • Format: JSON
    • URL: Paste your TrackFlow webhook URL
    • Webhook API version: Latest (2024-01 or newer)
  6. 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

  1. In Shopify webhook settings, click Send test notification
  2. Go to TrackFlow → your store → Setup tab
  3. 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

Next Steps