Install Varly on Shopify

Add the snippet to your Shopify theme in a few minutes, and check that it works.

In this article

On Shopify, the snippet goes into your theme. Every page of your online store uses the same layout file, theme.liquid, so you only paste it once. Shopify's checkout doesn't use your theme, so the snippet never runs there.

Add the snippet

  1. In Varly, open your site and click Install. Pick Shopify under 1. and copy the snippet under 2. Add the snippet.
  2. In your Shopify admin, go to Online Store → Themes.
  3. Next to your live theme, open the menu (the three dots) and choose Edit code.
  4. In the Layout folder, open theme.liquid.
  5. Find the closing </head> tag. Paste the snippet on a new line just before it.
  6. Click Save.

Switch tracking on

In Varly, go back to the Install page and click Turn tracking on under 3. Turn tracking on. You can also do this under Settings → Tracking & privacy.

The snippet picks this up within a minute.

Check that it works

Open your store in a normal browser window, accept the cookies and click through a few pages. Back in Varly, the Install page shows under 4. Check that data comes in how many pageviews came in during the last 24 hours. If nothing shows up, see Check that Varly is working.

Cart and checkout

By default, Varly never tracks pages that start with /checkout, /cart, /winkelwagen or /afrekenen. You can change this list under Settings → Tracking & privacy → Never track these pages.

If your store uses language or country folders, such as /en/cart, add those paths to the list too. The list matches the start of the path, so /cart doesn't cover /en/cart.

Connect your orders

The snippet itself never reads orders. Connect your store under Install → 5. Connect your orders, so your A/B tests can pick a winner based on orders and Click impact can show which clicks go together with orders and revenue. See Connect Shopify orders.

Common problems

I changed or updated my theme and data stopped. The snippet lives in the theme. A new theme, or a fresh copy from the theme store, doesn't include it. Paste it into the new theme's theme.liquid again.

I test on my .myshopify.com address. Varly only accepts data from the domains under Settings → Tracking & privacy → Domains. Add that address there if you want to test on it.

Nothing comes in, even though the snippet is in the theme. Make sure you accepted cookies on your own store. Varly measures nothing until the visitor agrees. See Cookie consent for the cookie banners Varly works with.

I see my own visits in the data. Use the link under Exclude your own visits on this device. See Exclude your own visits.

Was this article helpful?

Still stuck? Email support@varly.ai and we'll help you out.

Related articles