Documentation menu

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: your site, then Settings, then Installation. It looks like oa_pk_… and is safe to paste into your pages; it can only write events, never read anything.

Manual steps

1. 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>

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

3. Deploy (or run your dev server) and open the site once. The realtime view in your dashboard shows the visit within seconds; historical charts fill moments later.

Next

Route changes in a single-page app are tracked automatically, and the snippet never needs editing for updates. From here: custom events for the actions you care about, or script options for test mode and the privacy attributes.