Skip to Content
iAdvizeDocs
Shopify

Shopify

What the agent does on a Shopify store and how to set it up, in order. Connect the store, install the tag, install the pixel that measures sales, and how the agent works on the shopper's own cart.

On Shopify, the agent reads your catalog, works on the shopper's own cart and is credited with the orders that follow a conversation. Set it up in this order.

Connect your store

One connector, built from your store domain, gives the agent your catalog, the cart and your shop policies. Onboarding creates it for you when it can confirm the store runs on Shopify (see Catalog connection). See Connect your Shopify store.

The Installation steps follow the site's platform, not its connectors: if the platform isn't set to Shopify, Site settings > Installation shows the Google Tag Manager steps and warns that a Shopify connector is installed, with a Switch to Shopify button.

Install the tag

The tag is the same snippet on every platform (see Install the snippet). On Shopify, you paste it in your theme's theme.liquid file. It is the theme's default layout, the base through which its templates are rendered (Shopify, Layouts), so one paste puts the tag on the pages that use it.

In the agent, open Site settings > Installation and copy the snippet from the Install the tag card, under Theme snippet. The steps show once the site has an authorized domain.

In Shopify, duplicate your theme first, to keep a backup. Then, from your Shopify admin, go to Online Store, open the horizontal … menu and choose Edit code (Shopify, Edit theme code). A trial of a paid theme must be purchased before its code can be edited.

In the layout directory, open theme.liquid. Paste the snippet just before the closing </body> tag, as the Install the tag card says, and save the file. The snippet loads the tag after the page has loaded, so it does not slow the page's first render.

Open your store and check that the tag is detected.

What this does not cover, from Shopify's own docs:

  • A template that uses another layout, or none, does not render theme.liquid, so its pages do not get the tag (Shopify, Layouts). For another layout, paste the snippet there too.
  • Checkout pages use a separate checkout layout, not theme.liquid, so the tag does not run there. Your orders are still reported by the pixel of the next step, which runs in Shopify's Customer events, apart from your theme.
  • A theme update removes the code changes that are not compatible with it in the updated copy (Shopify, Edit theme code). After an update, check that the snippet is still in theme.liquid, and paste it again if it is not.

Measure sales

The pixel reports every completed order with its conversation key, and counts the add-to-carts made on your pages. With it installed, there is nothing else to add. See Measure sales on Shopify, and Measure your sales for what is common to every platform (how an order is linked to a conversation, the recording switches, the limits).

The shopper's own cart

On your site, the agent changes the cart the shopper sees in your header, and the panel shows a cart card. See The shopper's own cart on Shopify.

Shopify Markets

On a store that sells to several markets, the agent's prices, currency and product links follow the market of the page the shopper is on, with nothing to set up. See Shopify Markets.