Add Logiwolf to Shopify: a guide for theme.liquid

In Shopify the Logiwolf pixel belongs in your theme's theme.liquid file. That way you measure the homepage, collections, product pages and the cart. This guide also covers what applies at checkout and why a custom pixel is not the right route.

Updated on · Reading time: approx. 4 minutes

In short

Duplicate your theme, open «Edit code» and paste the snippet into layout/theme.liquid right before </head>. According to Shopify, this file covers all pages except checkout. Logiwolf therefore does not measure checkout, and the old checkout «Additional scripts» have been view only since August 2025.

Before you start

Add your shop as a website in the Logiwolf dashboard and copy the snippet with your pixel ID. The general steps for every platform are in the installation guide.

Add the pixel to theme.liquid

  1. 1

    Duplicate the theme

    In your admin, go to «Online Store». Shopify recommends duplicating the theme before any code change, so you have a backup.

  2. 2

    Open the code editor

    Click the menu icon next to your current theme and choose «Edit code». In the Shopify app, go to «Sales channels», «Online Store» and «Manage themes».

  3. 3

    Open theme.liquid

    In the «Layout» folder, open theme.liquid. It is the frame for all shop pages except checkout.

  4. 4

    Paste and save

    Paste the snippet right before </head> and save. Leave the {{ content_for_header }} line untouched in the head, Shopify needs it.

layout/theme.liquid
<head>
  <!-- other code of your theme -->
  {{ content_for_header }}
  <!-- Pixel Code - Logiwolf -->
  <script defer src="https://app.logiwolf.com/pixel/YOUR-PIXEL-ID"></script>
  <!-- END Pixel Code -->
</head>

Two notes from Shopify: a paid theme on trial has to be bought before you can edit its code. And if your code changes are incompatible with a theme update, Shopify removes all of them in the updated copy. Check after every update that the snippet is still there.

What applies at checkout

Checkout does not load theme.liquid. The old checkout.liquid file was for Shopify Plus only, and Shopify no longer supports it for the information, shipping and payment steps. The checkout «Additional scripts» have been view only since 28 August 2025. Stores without Plus had to upgrade their Thank you and Order status pages by 26 August 2026. As a replacement, Shopify points to web and app pixels.

For you this means: Logiwolf measures your shop up to the cart. The path through checkout and the order itself are in Shopify's own reports.

Why not as a custom pixel?

Under «Settings», then «Customer events», Shopify lets you add your own pixels. They run in an isolated environment, a sandbox iframe. According to Shopify they cannot access the top frame, and window.href returns the sandbox URL rather than the shop page. HTML tags such as <script> are not allowed there, and Shopify itself says that not all pixel functionality works in the sandbox.

The Logiwolf pixel reads the address, clicks and scrolling on the page itself, including for heatmaps and recordings. From inside the sandbox, going by Shopify's description, it sees neither the real page nor its address. That is why the snippet belongs in theme.liquid. If your previous tracking lived in several places, in the theme, in Additional scripts and in a custom pixel, clean it up so nothing runs twice.

Shopify cookies and the Shopify cookie banner

Shopify sets its own cookies in your store. They include essential ones such as _shopify_essential, cart and localization, plus _shopify_analytics in the analytics category and _shopify_marketing in the marketing category, both with a lifetime of one year.

Shopify's cookie banner is under «Settings», then «Customer privacy» and «Cookie banner». With «Use automated settings» it appears for the UK and the EEA once those markets are active. According to Shopify it governs Shopify's own tools, meaning cookies and Shopify pixels. For scripts you add to the theme yourself, you may need a third-party banner or your own logic. Shopify provides the Customer Privacy API for that, for example analyticsProcessingAllowed().

Logiwolf sets no cookies. Whether and how you list the pixel in your banner and privacy policy is up to your own assessment. The framework is explained in the guide to privacy-friendly web analytics and the guide Cookie banners in Switzerland.

Check the installation

  1. 1

    Preview the draft

    If you worked on a copy first, open the draft theme's preview and search the page source for app.logiwolf.com/pixel. Preview links for other people expire after two days.

  2. 2

    Open the shop

    After publishing, open your shop in a private window and view a few products.

  3. 3

    See yourself live

    You show up as a live visitor in the Logiwolf dashboard within seconds. In the browser's developer tools, the network tab shows the requests to app.logiwolf.com.

Other platforms: there are also guides for WordPress, Wix and Webflow.

Sources: Shopify Help, Edit theme code, Shopify Dev, Layouts, Shopify Help, Checkout upgrade, Shopify Dev, Pixels, Shopify Help, Custom pixel code, Shopify, Cookies, Shopify Help, Privacy settings, Shopify Dev, Customer Privacy API. As of October 2026.

Frequently asked questions

Shopify: frequently asked questions

Does Logiwolf measure Shopify checkout?
No. Checkout does not load theme.liquid, and Shopify no longer allows your own head code there. Logiwolf measures the shop up to the cart.
Do I need Shopify Plus for Logiwolf?
No. You edit theme.liquid in your theme's code editor. Plus was only needed for the old checkout.liquid file.
Is the snippet lost when the theme updates?
It can be. If your code changes are incompatible with the update, Shopify removes all of them in the updated copy. After every theme update, check in the code editor that the snippet is still right before </head>.
Can I add Logiwolf as a custom pixel under «Customer events»?
We do not recommend it. Custom pixels run in a sandbox without access to the actual page. The Logiwolf pixel needs the page itself, so it belongs in theme.liquid.
What do I do with old tracking code?
Before you create a custom pixel, Shopify recommends removing existing pixel code from theme.liquid, checkout.liquid and Additional scripts, so nothing is counted twice. The same applies to Logiwolf: add the pixel in one place only.
Free up to 2,000 pageviews · no credit card

Logiwolf in your Shopify store.

Sources, campaigns, heatmaps and replays in one tool. No cookies, hosted in Switzerland.