Documentation

Install on Shopify

Add Open Analytics to a Shopify site: where the snippet goes and how to verify it.

Before you start

You need your site's tracking key from the dashboard. It looks like oa_pk_… and is safe to paste into your pages; it can only write events, never read anything.

Where the key is

Open your site, then Settings → Installation. The key is shown there any time, alongside the ready-made snippet.

Add it to Shopify

In your Shopify admin, open Online Store, then Themes, then Edit code, and paste the snippet before </head> in theme.liquid.

layout/theme.liquid
<script
  async
  src="https://c.getopen.so/oa.js"
  data-key="YOUR_TRACKING_KEY"
  data-collector="https://c.getopen.so"
></script>

For purchase tracking, see the revenue guide: the conversion event with an order_id is what ties a payment to the visit.

Deploy and open the site at the address you gave the dashboard. The realtime view shows the visit within seconds; historical charts fill moments later. Loading it on your dev server first still tells you something: the dashboard's waiting screen names the host it saw the tag load on, and the tracker writes one line in the browser console when that host is not one the site counts. Visits themselves are only counted from the site's own domain, because localhost cannot be listed: deploy to see data, or empty the allowed domains list in Settings while you install. Nothing arriving? The troubleshooting page walks through the usual reasons.

Where to next