Install on Shopify

Add PerchLens to a Shopify storefront and track conversion checkouts.

Under 2 minutes5 stepsVisit Shopify
  1. Open your theme's code editor

    Shopify admin → Online Store → Themes → Actions (next to your live theme) → Edit code.

  2. Find theme.liquid

    In the left file tree, expand 'Layout' and click theme.liquid. This is the wrapper for every storefront page.

  3. Paste the script in the <head>

    Add the tracking script just before the closing </head> tag.

    <script defer src="https://perchlens.com/cv.js" data-site="{SITE_ID}"></script>
  4. Set up checkout tracking

    For tracking conversions through to checkout, add the same script to Settings → Checkout → Order status page → Additional scripts. This requires Shopify Plus for the order confirmation page; Basic plans only get product/cart pages.

  5. Save + verify

    Click Save in the top-right. Visit your storefront once and confirm pageviews appear in the PerchLens dashboard.

Tip: Replace {SITE_ID} in the snippets above with your actual tracking ID. You'll find it in Settings → Tracking after creating a site.

Troubleshooting

Pageviews track but checkout conversion doesn't

Shopify isolates checkout pages — you need Shopify Plus to add scripts there. On Basic, track add-to-cart events as a proxy.

I see double pageviews

Check you haven't pasted the script in both theme.liquid AND a section file. One canonical injection point only.

Other platforms

No PerchLens account yet?

Create a free account to get your tracking ID — takes about 30 seconds.

Set it up in 30 seconds. Replaced two paid tools.

Indie maker on X

Finally, analytics I actually look at every day.

SaaS founder

My users appreciate no cookie banner. I appreciate the simplicity.

Agency developer

Ready for simpler analytics?

Join thousands of makers who track their sites with clarity, not complexity. Free forever for up to 3 sites.