Skip to Content
iAdvizeDocs

Measure your sales

How the orders of your store reach the agent on any platform, how an order is linked to the conversation it followed, the two recording switches, how to check it works, and the limits that apply everywhere.

The agent credits an order to a conversation only when the order reaches it carrying that conversation's key. Two things have to happen:

  1. Your store reports each completed order to the agent, with or without a conversation. Without it, the Sales report has no order to count, assisted or not.
  2. The order carries the conversation's key when there is one. An order with the key of a conversation counts as assisted. An order with no key, or with a key that matches no conversation, counts for your site only.

The key is an opaque value starting with atr_, created for one conversation. Treat it as a label: do not parse it or rely on its format. The agent never guesses a link, not even from a product it recommended.

Set it up

  • Shopify: the pixel you paste in Shopify's Customer events reports every completed order, with its key. See Measure sales on Shopify.
  • Any other platform, with or without a native connector (Adobe Commerce, BigCommerce, commercetools, WooCommerce, a custom store…). The Track your sales card of Site settings > Installation recommends Google Tag Manager. Three ways:
    • the Sales template of Google Tag Manager, downloaded from the Track your sales card, which reports orders and add-to-carts from your dataLayer through the transaction and addToCart commands;
    • one line of JavaScript on your order confirmation page, the transaction command, which sends the key for you;
    • one HTTP request per order from your server or order system.

Every way sends to the same endpoint, so the same rules apply to every order: one order per reference and per site, the first one received wins, and nothing is recorded for a shopper who objected or while order recording is off.

The two switches

Two switches of the Sales measurement card, in Site settings > Site access, decide what the agent records from your store. They are separate: you can stop one and keep the other.

SwitchOff, it stops
Count add-to-carts on your pagesThe add-to-carts reported from your own pages, by the Shopify pixel, the Google Tag Manager Sales template or the addToCart command. The add-to-carts the agent makes in conversation are still counted. Orders are not affected.
Record orders from your storeEvery order your store reports, from the Shopify pixel, the Sales template, the transaction command or a server. The agent also stops creating a key for conversations on your site, so no cookie is written and no Shopify cart is tagged.

Both are on by default. A site that had Count add-to-carts on your pages off before the two were split starts with Record orders from your store off too, so a collection you had stopped does not resume on its own.

With Record orders from your store off, assisted revenue, the agent's conversion rate and the agent A/B tests on purchases stay empty from then on, and the site opens no orders alert. Orders already recorded stay until the retention schedule removes them. See Site access for the card, and the REST API (storefrontOrderCountingEnabled on Update a site) or the MCP server to change it without the dashboard.

Check that it works

  • Place a test order on your store, then open the Orders page of the Sales report. Your site's revenue includes the order. A test order counts like a real one, see Limits.
  • Read the latest order received without the dashboard: lastStorefrontOrderAt in Get a site's storefront activity, or the MCP tool get_storefront_activity. It is the time the agent received the latest order, null before the first. The Orders received row of the Track your sales card, in Site settings > Installation, shows the same time on every platform.
  • Check the link to a conversation. Chat with the agent on your site, then place an order in the same browser within the attribution window. The order shows in the conversation's Sale attribution.

When orders are not being recorded, the Orders page of the Sales report says so above its tiles: Orders from your store are not being recorded. The figures below no longer grow. It links to Open Site access settings when the cause is the site's Record orders from your store switch. Without the link, recording is stopped for every site by iAdvize, not by a setting you can change.

The endpoint answers every request the same way, recorded or not, so the network answer never tells you whether an order was kept. Use the checks above.

When a shopper objects

A shopper can object to measurement from the panel or through your consent tool's privacy call. Then:

  • no key is created for their conversation, and the key cookie is deleted if an earlier page wrote it;
  • the transaction command and the Shopify pixel send nothing for their orders;
  • the agent drops any order that arrives marked as objected.

The order is not recorded at all, not even for your site's total.

How an order is linked

Who gets a key

A conversation on your site, through the web tag, gets a key at the shopper's first message when:

  • Record orders from your store is on for the site;
  • the shopper has not objected.

This holds on every platform: a site with no connector gets a key too. There is no consent step in between.

On your AI Storefront, which has no store page and no cookie of its own, the key is created when the agent first writes a cart for the shopper. That needs a Shopify connector. Playground conversations and evaluation runs never get a key.

Where the key goes

When the agent's reply to a shopper's message reaches the page, the tag keeps the key in a first-party cookie on your site:

  • Name: iadvize_atr_<site key>, where <site key> is the public key in your install snippet (pk_site_…). Two sites served under one domain each keep their own.
  • Domain: the widest domain of your site the browser accepts, so a page on www.example.com writes it on example.com and a confirmation page on checkout.example.com reads it. On an IP address or localhost, it stays on that host.
  • Lifetime: the site's attribution window, counted from the latest message. Each message the shopper sends writes it again, so it expires one window after their last message, the same anchor the Sales report uses.
  • Attributes: path /, SameSite=Lax, and Secure on an https page. It is not HttpOnly: the tag writes and reads it by script, and the browser also sends it with the requests your pages make to your own domain, so your server can read it.

On Shopify, the tag also puts the key on the store's own cart, and the agent puts it on the carts it creates. See How an order gets its key on Shopify.

The cookie authorizes nothing and looks nothing up. It is only read back by the transaction command, the Shopify pixel, or a sender of your own, and sent with the order.

How the match is made

The agent counts an order for a conversation only when the order's key matches that conversation's key exactly, within your organization, and the order was placed within the site's attribution window after the shopper's last message. A key that matches nothing, such as one typed by hand, links nothing. A key from another organization credits nothing.

Deleting a conversation removes its key from the orders that carried it. The order stays.

Orders that stay unlinked

An unlinked order is still recorded when it reaches the agent. It counts for your site, not for the agent.

  • Another device or browser. The cookie lives in the browser the shopper chatted in. An order placed from their phone after a conversation on their laptop carries no key.
  • A confirmation page on another domain. The cookie is on your site's domain. An order confirmed on a different domain (a hosted checkout on the platform's own domain, say) cannot read it.
  • The tag did not run. A script blocker that stops the tag stops the cookie and the transaction command alike. With the command, the order is then not reported at all.
  • Before the first reply. An order completed before the agent's reply to the shopper's first message reached the page.
  • Recording was off. A conversation held while Record orders from your store was off has no key.
  • An objection. See When a shopper objects.
  • An earlier conversation. The cookie holds the key of the latest conversation that sent a message. An order that followed an earlier conversation, with a later one in between, counts for the later one.
  • Safari's limits on script cookies. Safari caps the lifetime of cookies written by script, at 7 days, and at 24 hours when the shopper arrived through a link decorated by a site Safari classifies as a tracker (WebKit, Intelligent Tracking Prevention 2.1 and 2.2). With a window of 7 days at most, only the 24-hour case can shorten it.

Limits

These apply to every order reported, on every platform.

  • Reported from the browser, so forgeable. The site key in your snippet is public. Anyone who reads it can post an order for your site. A forged order changes only your own organization's figures. Do not treat a recorded order as proof that a sale happened.
  • No refunds or cancellations. The agent records neither, from any source. An order refunded or cancelled later keeps counting at its full amount.
  • Test orders count. An order reported this way carries no test flag.
  • No order lines. Only the total is recorded, not the products in it. The Shopify pixel already sends the lines, but the agent does not store them yet.
  • The amount is what you send. On Shopify, the pixel sends the checkout subtotal; elsewhere, the amount you pass. Keep it consistent (with or without tax, before shipping) so your figures compare over time.