Segment
Connecting accounts · Other platforms

Segment

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. 1. Get your write key

    Use an HTTP API source. Don't use a JavaScript website source.

    1. In Segment, go to Connections → Sources.
    2. 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.
    3. On the source's Overview tab, copy the Write Key. It's also under Settings → API Keys.

  2. 2. Connect in PixelRelay

    1. Open Connections and click Connect on Segment.
    2. Paste the key into HTTP API write key.
    3. 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 happenedSegment event
Product viewedProduct Viewed
Added to cartProduct Added
Cart viewedCart Viewed
Checkout startedCheckout Started
Payment info addedPayment Info Entered
SearchProducts Searched
Order placedOrder Completed
Order refundedOrder 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 seeTry this
Nothing in the DebuggerCheck 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 logCopy the write key again from the source's Overview tab and paste it under Edit.
Purchases missingCheck Reports → Event log for the order. See Events aren't reaching a platform.

Need help? Email [email protected]