Tracking

Snapchat pixel and Conversions API on Shopify

Set up the Snap Pixel on Shopify with Snap's app, a custom pixel or Google Tag Manager, add the Snapchat Conversions API, deduplicate and verify events.

·5 min read·By the ROASaurus team

Key takeaways
  • The Snap Pixel reports shop events such as PAGE_VIEW, ADD_CART and PURCHASE to Snapchat, so you can measure ads, optimize for purchases and build audiences.
  • On Shopify, the simplest route is Snap's own Snapchat Ads app; a custom pixel under Customer events or Google Tag Manager also works.
  • The Snapchat Conversions API sends the same events from a server; give browser and server copies the same event id so Snapchat counts one.
  • Check the setup with the Snap Pixel Helper extension, the test events in Events Manager and a week of purchases against your orders.
  • The click id (ScCid) and the _scid cookie are what tie a purchase to a Snapchat ad, so keep them from the landing page to the order.

To track Snapchat ads on Shopify, you need the Snap Pixel on your store and, ideally, the Snapchat Conversions API next to it. The pixel reports what shoppers do in the browser; the Conversions API sends the same events from a server, so purchases still reach Snapchat when the browser blocks the pixel. This guide covers what you need, three ways to install the pixel, how to add the Conversions API, and how to check that it all works.

What you need before you start

  • A Snapchat Ads account (in Snapchat Ads Manager) with a payment method.
  • Admin access to your Shopify store.
  • For the Conversions API: a Conversions API token, created in Snapchat Ads Manager for your pixel.
  • A cookie banner that passes consent to Shopify, if your market requires consent for marketing cookies.

What the Snap Pixel tracks

Shop actionSnap eventWhat Snapchat uses it for
Any page viewPAGE_VIEWAudiences of site visitors
Product pageVIEW_CONTENTProduct audiences and catalog (dynamic) ads
Add to cartADD_CARTCart abandoner audiences, mid-funnel optimization
Checkout startedSTART_CHECKOUTCheckout abandoners
Order paidPURCHASEReporting, purchase optimization and value
Snapchat's standard event names are written in capitals with underscores.

The pixel also sets the first-party _scid cookie, and an ad click adds a ScCid click id to the landing page URL. Those two values are what let Snapchat connect a later purchase to the ad.

Three ways to add the Snap Pixel to Shopify

1. Snap's Snapchat Ads app

  1. Install the app

    Install Snap's Snapchat Ads app from the Shopify App Store and log in with your Snapchat business account.

  2. Pick the ad account

    Choose the ad account that should pay for and report your ads. Check that it has a payment method.

  3. Connect the pixel

    Use the option to connect a Snap Pixel. If the ad account has none yet, the app creates one.

  4. Sync the catalog

    If you want catalog ads, select the organization to sync your product catalog with, then check in Ads Manager under Catalogs that the products arrived.

2. A custom pixel under Customer events

Copy the pixel base code from Events Manager in Snapchat Ads Manager (choose the manual setup), then create a custom pixel under Settings › Customer events in Shopify. Subscribe it to Shopify's standard events and call snaptr('track', ...) for each, with the order id as client_dedup_id on PURCHASE. Custom pixels also run on checkout pages, where theme code does not.

3. Google Tag Manager

In GTM, add the Snap Pixel base code as a tag on all pages and event tags on your ecommerce triggers. On Shopify, GTM itself must be loaded through a custom pixel to reach the checkout, so this route is mostly for stores that already run everything in GTM.

Add the Snapchat Conversions API

The Conversions API (CAPI) lets a server post events to Snapchat. A purchase sent from your store's order data reaches Snapchat even when an ad blocker stops the pixel or the thank-you page never loads. Each event carries the event name, time, an event_id and customer information: hashed email and phone, the shopper's IP address and user agent, the click id and the _scid cookie.

Snapchat Conversions API: a Purchase (trimmed example)
POST https://tr.snapchat.com/v3/<PIXEL_ID>/events?access_token=<TOKEN>
{
  "data": [{
    "event_name": "PURCHASE",
    "event_time": 1792929600000,
    "event_id": "order-1042",
    "action_source": "WEB",
    "event_source_url": "https://yourstore.com/checkouts/thank-you",
    "user_data": {
      "em": ["<SHA-256 of the email>"],
      "ph": ["<SHA-256 of the phone>"],
      "client_ip_address": "203.0.113.24",
      "client_user_agent": "Mozilla/5.0 (iPhone; ...)",
      "sc_click_id": "<ScCid from the ad click>",
      "sc_cookie1": "<_scid cookie>"
    },
    "custom_data": { "currency": "USD", "value": 74.00, "order_id": "1042" }
  }]
}

Snapchat deduplicates a browser and a server copy of the same event when they share the id: client_dedup_id in the pixel and event_id on the server event. Build it from the order id, so both sides know it without talking to each other.

Shopper clicks a Snap adLanding URL carries ScCid
VisitPixel sets _scid; the click id is saved
Order #1042 paidPixel sends PURCHASE, dedup id order-1042
Server sends PURCHASEevent_id order-1042 with hashed contact data
Snapchat counts one
Both copies share one id, so the purchase is counted once.

Verify the setup

  1. Snap Pixel Helper

    Install Snap's Pixel Helper extension for Chrome, browse your store and check out. Each event should appear once, with your pixel id.

  2. Events Manager

    Open your pixel in Snapchat Ads Manager's Events Manager. Test events (with a test event code on server requests) show incoming events with their source.

  3. A week of numbers

    Compare PURCHASE events with paid Shopify orders for the same week. Far fewer means events are lost; more means duplicates.

How ROASaurus sends Snapchat conversions

In ROASaurus, Snapchat is one of the destinations under Connections › Tracking & destinations: you enter the pixel id and a Conversions API token, and optionally a test event code. ROASaurus then sends page views, product views, add to cart, checkout and purchases to Snapchat's Conversions API, with the order's email, phone, name and address normalized and hashed, the shopper's IP address and user agent, the ScCid click id and _scid cookie saved during the visit, and the order id and items. Tick Also load the browser pixel and ROASaurus also fires the Snap Pixel on your store, with the same id as client_dedup_id that the server event uses as event_id (order- plus the order id for a purchase), so Snapchat counts each order once. In that case, remove the Snap Pixel from other apps and your theme. An event with no email, phone or IP address plus user agent is skipped, because Snapchat cannot match it.

The ROASaurus Mac app showing Tracking health: a card per destination, Purchase accuracy per day for Meta, GA4 and TikTok, and accuracy per payment method. Fictional demo store, simulated data.
The ROASaurus iPhone app showing Tracking health: a card per destination, Purchase accuracy per day for Meta, GA4 and TikTok, and accuracy per payment method. Fictional demo store, simulated data.
Data quality › Overview in the public demo (ROASaurus Demo Store, a fictional store, simulated data): Snapchat's accepted purchases next to the other destinations.

The Snapchat destination is built from Snap's Conversions API documentation; like most destinations other than Meta and Google Ads, it has not yet carried a customer's production traffic. Data quality › Deliveries shows each Snapchat request with its status and Snap's response, so you can see the first events arrive.

Next step

Sources

  1. Snap for Developers: Conversions API
  2. Snap for Developers: Conversions API parameters
  3. Snapchat Business Help: Install the Snap Pixel on your website
  4. Shopify App Store: Snapchat Ads

In ROASaurus

Keep reading

Tracking"No recent conversions" in Google Ads: causes and fixesWhat "No recent conversions" (now "Awaiting conversions") means in Google Ads, how to tell a quiet week from a broken tag, and the fix.TrackingCookieless tracking for online stores: what still worksCookieless tracking for online stores: server-side events, modeling and fingerprinting compared, what each still measures and what consent requires.TrackingGoogle Ads conversion tracking problems on ShopifyWhy Google Ads counts too few, too many or wrongly valued Shopify purchases, what each status and warning means, and a health check to find the cause.

FAQ

Questions, answered

More answers in the FAQ and the help center.

How do I add the Snapchat pixel to Shopify?

Install Snap's Snapchat Ads app and connect your pixel, or add the pixel code as a custom pixel under Settings › Customer events, or load it through Google Tag Manager. Use one of the three, not several.

Where do I find the Snap Pixel code?

In Snapchat Ads Manager, open Events Manager, select your pixel and choose the manual setup to see the code and the pixel id.

Can I check my Snap Pixel with a browser extension?

Yes. Snap's Pixel Helper extension for Chrome shows which Snap pixels and events fire on each page while you browse and check out.

Does Snapchat deduplicate pixel and Conversions API events?

Yes, when the browser event's client_dedup_id and the server event's event_id have the same value. Use the order id for purchases.

How do I track Snapchat conversions on Shopify?

Fire PURCHASE with the order value and currency on the thank-you page through the pixel, send the same purchase from your server through the Conversions API with the same id, and choose purchase as the optimization goal in your campaigns.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. Free plan, no credit card.