Shopify integration
BHmetrics ingests Shopify webhooks and fans them out as server-side conversion events to every connected ad platform (Meta, TikTok, Pinterest, Snap, Google). Setup takes ~5 minutes.
1. Create the webhook in Shopify
- In Shopify admin, go to Settings → Notifications → Webhooks.
- Click Create webhook.
- Event:
Order creation· Format:JSON· API version: latest stable. - URL:
https://your-conduit-domain.com/api/webhooks/shopify?brand=<brandId> - Save. Repeat for
Order fulfilled,Refund created, andCustomer created.
2. Get the brand ID
In BHmetrics, go to Settings → Brand — the brand ID is the UUID at the top of the page. Copy/paste into the webhook URL above.
3. HMAC verification
BHmetrics verifies every webhook with the X-Shopify-Hmac-Sha256 header. SetSHOPIFY_WEBHOOK_SECRET in your BHmetrics environment to your Shopify webhook signing secret (Shopify shows it next to each webhook).
4. Verify the loop is live
- Place a $0.01 test order on your store.
- Within ~10 seconds the order should appear in Webhooks → recent events.
- Each row shows per-platform dispatch status. If something failed, click Replay.
Troubleshooting
- 401 invalid hmac → secret mismatch; double-check both Shopify and BHmetrics env.
- 404 no brand → bad brandId in URL.
- All platform dispatches show
error→ no platforms connected. Add OAuth in Settings → Connections. - Some platforms succeed, some fail → check that platform's adapter token has not expired (rotate via Connections).