Evarist on your Shopify store.

Installing the app, how consent is handled, headless storefronts, and stores that check out on their own system. The headless and checkout sections are written for a developer.

01 / The app

The app, and how to install it.

The native Evarist app is live on the Shopify App Store. Install it from apps.shopify.com/evarist, then open it in your admin and follow the setup guide: Agree and continue, then turn on the Evarist app embed in your theme editor. No code, and Shopify already knows your store, so there's no domain to type. If you already use Evarist at app.evarist.ai, the same page offers to link the store to that account instead.

The app turns on tracking through a theme app embed and a web pixel. If you already track this site with the snippet or a tag manager, remove it once the app is connected: the app replaces it. Orders are deduplicated by order ID across every source, so your revenue stays correct either way; but while both are running, page events and any goals you set up on the old tracking can be counted twice, so don't leave them side by side longer than the switchover.

The pixel also sends the product id with each product view, so that data is collected on a Shopify store with nothing to wire. Asking about individual products on top of it is still being finished. On a storefront you built yourself, see product ids.

Evarist lives in your Shopify admin. Once your store has its first visitor, the app opens on your numbers for the period you pick, with orders and revenue taken from your Shopify orders, and Ask Evarist answers questions about your traffic without leaving your admin. The same store at app.evarist.ai shows the same numbers. Settings is in the admin too, in the sidebar: what Evarist is receiving, which event counts as your goal, the visitor properties you declared, and your ad platforms. Your team and extra domains are account-wide, so they stay at app.evarist.ai.
03 / Headless

Headless storefronts.

Running Shopify behind a custom frontend instead of the Online Store (Hydrogen, or your own React/Next.js site)? A theme app embed can't reach those pages, so set up tracking manually with the two steps below. This works today, independent of the app. One exception: a Shopify-hosted customer or subscription portal (native Shopify customer accounts, or an app like Recharge's own portal) is still a Liquid Online Store page, so the app's theme app embed reaches it automatically even while your main storefront is headless, with no manual setup needed there.

Install the snippet on every page

Paste the tracking snippet into your storefront's root layout or template, on every page, not just one.

If Shopify creates your orders

The common case, even with a custom frontend. Whenever you build or update the cart, set a Shopify cart custom attribute named _evarist to the value of the visitor's _evarist cookie, via the Storefront API's cartAttributesUpdate mutation:

mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
  cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
    cart { id }
    userErrors { field message }
  }
}

# variables
{
  "cartId": "YOUR_CART_ID",
  "attributes": [{ "key": "_evarist", "value": "VALUE_OF_THE_EVARIST_COOKIE" }]
}

It rides through to the order, so Evarist attributes the purchase to the right visitor, no matter where checkout renders. This only carries the anonymous visitor id, never anything about the customer. If you run subscriptions (through Recharge or another subscription app on top of Shopify), setting this attribute is required, not just helpful: in most subscription setups it is carried forward from the first order onto future rebills, which is what lets Evarist credit each rebill to the channel that originally acquired the subscriber instead of reporting it as unattributed revenue. How much of that carries through depends on the subscription app, so expect good coverage rather than every single rebill.

One timing note: the tracker loads asynchronously, so on a brand-new visit the _evarist cookie may not exist yet when you first create the cart. Read the cookie fresh at every cart mutation rather than caching it at page load, and have the handler that sends the shopper to checkout set the attribute one last time, so a cart created before the tracker finished loading still picks it up. The value present at checkout is the one that rides through; a cart that never got it simply shows as an unattributed order, nothing breaks.

04 / Your checkout

Checkout on your own system.

If checkout isn't Shopify at all, install the snippet and tag your order-confirmation page as a goal, the same no-code flow as any other outcome: Track what matters.

If the amount varies per order, fire it from code with one JS call.