On Shopify, the pixel is installed in the store theme: you paste it once in the main layout file and it loads on every page of the store.
Before you start
- Create the campaign with the domain your customers see. If your store uses a custom domain (for example
mystore.com), use that one and not themyshopify.comaddress. The pixel only works when the page domain matches the campaign domain. - Copy the code from Campaigns, option Install pixel.
Steps
- In the Shopify admin, go to the themes section of your online store.
- On the published theme, open the actions menu and choose the option to edit the theme code.
- In the layout folder, open the
theme.liquidfile. - Find the closing
</head>tag. - Paste the pixel code right before that tag.
- Save.
The exact menu names may change depending on the version of the Shopify admin; what matters is reaching the theme code editor and the theme.liquid file.
Recommendations
- Before editing, duplicate the theme so you have a backup copy.
- If you switch themes later, you will need to paste the code again in the new theme.
- Checkout pages do not use the theme layout file, so a pixel installed this way does not load there.
Showing recent sales
The pixel only displays notifications; for a Conversions notification to show real purchases, you need to send the data of each sale to Notikit. The way to do it is the notification webhook: see Track conversions with a webhook.
Do not point Shopify order notifications straight at that URL: the Notikit webhook stores everything it receives, and an order carries all the buyer details. Route the notice through an intermediary (an automation tool or a script of your own) that forwards to Notikit only what you will display: first name, product and city.
To confirm the pixel is installed correctly, continue with Verify the pixel installation.