Triple Whale
Track your NEXT campaign in Triple Whale on a store that syncs orders to Shopify. Stores without Shopify can load the pixel but do not get attributed sales yet.
The starter templates include the Triple Whale pixel. Add your Triple Whale details and the pixel loads on every campaign page, so Triple Whale can see the visit.
This guide is for stores that sync their orders to Shopify with Shop Sync, where Triple Whale gets the sale from Shopify. On a store without Shopify, Triple Whale cannot attribute campaign sales yet. See Stores without Shopify.
How it works on a Shop Sync store
- The pixel on your campaign records the shopper's visit and where they came from.
- When the shopper enters their email or phone at checkout, the campaign sends it to Triple Whale.
- Shop Sync creates the order in Shopify, and Triple Whale picks it up from there.
- Triple Whale uses the email or phone to connect the Shopify order to the campaign visit.
The campaign does not send the purchase itself. If it did, Triple Whale would see the same sale twice: once from the campaign and once from Shopify.
Before you start
- A Triple Whale account connected to the Shopify store your orders sync to.
- Shop Sync set up, so campaign orders reach Shopify with the
NEXTtag. See the Shop Sync onboarding guide. - A campaign that is ready for tracking. See Set up tracking.
Set up
- In Triple Whale, open Settings, then Business Configurations, then Pixel Settings, and select the Pixel Installation tab. Save a Shopify Headless Account Setup to see the Headless Installation snippet.
- In the snippet, find
TripleName. It is yourmyshopify.comdomain, for exampleyour-store.myshopify.com. Copy it. Do not paste the snippet into your pages; the template already includes it. - In
_data/campaigns.json, add these four lines to your campaign:
{
"my-campaign": {
"name": "My Campaign",
"triplewhale_name": "your-store.myshopify.com",
"triplewhale_platform": "SHOPIFY",
"triplewhale_contact_enabled": "true",
"triplewhale_blocked_events": "dl_purchase, dl_upsell_purchase"
}
}- Build with
npm run buildand deploy.
| Line | What it does |
|---|---|
triplewhale_name | Turns the pixel on for your Triple Whale shop |
triplewhale_platform | Ties the campaign to your Shopify store in Triple Whale |
triplewhale_contact_enabled | Sends the shopper's email and phone, so the Shopify order can be connected to the visit |
triplewhale_blocked_events | Stops the campaign sending the purchase, so the sale is counted once |
This sends personal data
triplewhale_contact_enabled sends the shopper's email and phone to Triple Whale as soon as they are entered. It is not tied to the marketing opt-in checkbox. Turn it on only when your privacy policy covers it. See Privacy and consent.
What gets tracked
| When | What Triple Whale receives |
|---|---|
| Any page loads | The visit |
| An item is added to the cart | AddToCart |
| The shopper enters an email or phone at checkout | Contact |
| The order syncs to Shopify | The order, through Triple Whale's Shopify connection |
The sale appears in Triple Whale after the order syncs to Shopify, not at the moment of payment. An accepted upsell is added to the same NEXT order, so it is included when that order syncs.
Express wallet buyers
A shopper who pays with Apple Pay, Google Pay or PayPal may never type an email or phone into the checkout. No Contact is sent for them, so Triple Whale may not be able to connect their order to an ad.
Verify it works
- Open your campaign in a new private window, with test details on the link, for example
?utm_source=tw-test&utm_campaign=tw-test. - In the browser console, run
TriplePixel('State'). It should return"Ready". - Type an email at checkout and place an order.
- Check the order reached Shopify with the
NEXTtag. A test order is not sent to Shopify automatically, so request fulfillment on it in NEXT. It arrives in Shopify marked as a test order. - In Triple Whale, find the order by the buyer's email and check the source it is attributed to.
| What you see in Triple Whale | What it means |
|---|---|
| One order, attributed to your test source | Everything is working |
| One order, not attributed | The order arrived from Shopify, but Triple Whale did not connect it to the visit. Check triplewhale_contact_enabled is on and the email matches |
| Two orders for one sale | The campaign is still sending the purchase. Check triplewhale_blocked_events. If that is set, the order may have shipped in two parts, which shows as two Shopify orders |
| No order | The order has not reached Shopify yet, or Triple Whale is not connected to that Shopify store |
Triple Whale's Pixel Helper extension only works in a normal Chrome window. In Triple Whale's Pixel Settings, "Online Store: Not Installed" is expected for a campaign.
Stores without Shopify
Attributed sales are not supported yet
Triple Whale attributes a sale by connecting an order record to the shopper's visit. On a Shopify store the order record comes from Shopify. On any other store it has to be sent to Triple Whale's Orders API alongside the pixel's purchase event, and NEXT does not send orders there. Without Shopify, Triple Whale gets the pixel events but no orders, so campaign sales will not be attributed to your ads.
You can still load the pixel to see campaign visits in Triple Whale. Add only this line to your campaign, with your campaign's domain as the value, and leave out the other three lines from the Shop Sync setup:
"triplewhale_name": "campaign.example.com"The campaign then sends Triple Whale the visit, add to cart, and each purchase and upsell from the browser. Upsells arrive as an UpsellPurchase event. None of these turn into attributed revenue until Triple Whale also receives the order.
If Triple Whale attribution matters for a store without Shopify, use Shop Sync to send the orders to a Shopify store connected to Triple Whale, and follow the setup above.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| The pixel is not on the page | triplewhale_name is missing or empty | Add it and rebuild |
| Data lands in the wrong Triple Whale shop | triplewhale_name does not match your Triple Whale snippet | Copy TripleName from the snippet again |
| Visits show in Triple Whale but no sales are attributed, on a store without Shopify | Triple Whale gets no order record for the campaign's sales | Not supported yet. See Stores without Shopify |
| Meta counts each order twice | Triple Whale Sonar and the NEXT Meta Pixel app both send it to Meta | Exclude orders tagged NEXT in Sonar, or use only one of the two |