Send your store's events to Segment, then route them on to the rest of your tools from there. PixelRelay sends from our servers straight to your Segment source. You don't add Segment or analytics.js to your theme.
1. Get your write key
Use an HTTP API source. Don't use a JavaScript website source.
- In Segment, go to Connections → Sources.
- Open your HTTP API source. Don't have one? Click Add source, pick HTTP API, name it (for example Shopify - PixelRelay), and click Add source.
- On the source's Overview tab, copy the Write Key. It's also under Settings → API Keys.
2. Connect in PixelRelay
- Open Connections and click Connect on Segment.
- Paste the key into HTTP API write key.
- Click Connect.
Saving doesn't start sending yet. PixelRelay doesn't test the key when you save. To change it later, click Edit. Leave the field blank to keep the saved key.
Turn it on
In Guided setup → Switch & enable, work through Switch over Segment, click Mark as done on each item, then click Enable Segment tracking.
Already sending Shopify events to Segment from another source or analytics.js? Point PixelRelay at a separate HTTP API source and compare the two before you switch anything off. Sending the same events from two places gives you duplicates in Segment.
What arrives in Segment
Segment gets every event, whatever your Settings → Attribution mode is. Each one is a Segment track call:
| What happened | Segment event |
|---|---|
| Product viewed | Product Viewed |
| Added to cart | Product Added |
| Cart viewed | Cart Viewed |
| Checkout started | Checkout Started |
| Payment info added | Payment Info Entered |
| Search | Products Searched |
| Order placed | Order Completed |
| Order refunded | Order Refunded |
Orders carry the order ID, revenue, currency and products. With Recharge connected, subscription events come through too. Page views need Pro and Track page views server-side under Settings → Relay.
Each event has an anonymousId (PixelRelay's first-party visitor ID). When the shopper's consent allows it, userId is a SHA-256 hash of their email, never the email itself.
Check it's working
- In Segment, open your source and go to the Debugger tab. Browse your store or place a test order and the events should show up there.
- In PixelRelay, open Reports → Event log and hover the Segment icon on a recent event. Delivered means Segment accepted the request.
Troubleshooting
| What you see | Try this |
|---|---|
| Nothing in the Debugger | Check the key came from an HTTP API source, and that you're looking at that same source. If your workspace is in the EU region, see the warning above. |
| Not accepted in the event log | Copy the write key again from the source's Overview tab and paste it under Edit. |
| Purchases missing | Check Reports → Event log for the order. See Events aren't reaching a platform. |
Need help? Email [email protected]