Skip to content

Install Statsdot on Shopify

Updated October 13, 2026

Add the snippet to your theme

  1. In your Shopify admin, go to Online Store → Themes.
  2. Next to your current theme, open the menu (…) and choose Edit code.
  3. Open layout/theme.liquid.
  4. Paste your snippet just before </head>:
<script defer data-domain="yourshop.com" src="https://statsdot.com/js/script.js"></script>
  1. Save.

Use the domain your customers see, for example yourshop.com. If your shop also opens on yourshop.myshopify.com, add that domain as a separate site only if visitors really use it.

What you will see

Product, collection, blog and content pages, where visitors come from, which campaigns bring them, and how many reach the cart. Make the cart page a goal (/cart) on the Sites page to see the share of visitors who add something.

What you will not see

Shopify's checkout and order status pages are not part of your theme, so the snippet does not run there and Statsdot cannot count completed orders yet. Use Shopify's own reports for sales and Statsdot for traffic and the steps before checkout.

When you change theme

The snippet lives in the theme, so add it again if you publish a different theme.