Skip to content
pixelary Docs

Shopify

Theme snippet Checkout soon

Add the script to your theme and Pixelary tracks the storefront: page views, product pages, forms and the clicks you choose. Purchase tracking on Shopify’s checkout is coming soon.

1 Open the theme code

In Shopify admin go to Online Store → Themes, open the … menu next to your live theme and choose Edit code.

2 Paste the script into theme.liquid

Open layout/theme.liquid and paste the script just before </head>:

layout/theme.liquid
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script>

Click Save. Repeat after switching to another theme.

3 Verify

Open your store and check the Install page in the dashboard.

Checkout and Purchase

Shopify’s checkout and thank-you pages don’t load theme code, so the theme script can’t see a purchase. A guide for sending Purchase from Shopify’s Customer Events, and a Pixelary app for Shopify, are coming soon.

One pixel, one sender

If Shopify’s Facebook & Instagram or TikTok sales channel already sends events for the same pixel, storefront events are counted twice. Turn off the channel’s data sharing for that pixel, or wait for the Pixelary app for Shopify, which will cover checkout too.

Pixelary sends nothing a visitor has declined. In the EEA, the UK and Switzerland it waits for the visitor’s yes before any pixel loads or any event leaves the page.

Visitors from Europe need a consent banner

Without a banner, Pixelary never gets a yes from visitors in the EEA, the UK and Switzerland, so they are not tracked.

If you use Shopify’s own cookie banner, pass the visitor’s answer to Pixelary with the JavaScript API, or use a banner from the list below.

Pixelary reads these on its own, with no extra setup:

  • Google Consent Mode v2
  • IAB TCF 2.2
  • Global Privacy Control
  • Cookiebot
  • OneTrust
  • CookieYes
  • Usercentrics
  • Complianz
  • iubenda
  • Termly
  • Osano
  • CookieFirst
  • Didomi (via TCF)
  • Framer cookie banner

Another banner can pass its answer with one line of code. Consent & banners

Something here doesn’t match what you see? Write to hello@pixelary.app.