Skip to Content
iAdvizeDocs

Install without Google Tag Manager

Install the agent and report orders and add-to-carts by hand, on every platform except Shopify, for a store with no Google Tag Manager. Paste the install snippet, call the transaction and addToCart commands, then check it in the dashboard.

This is the manual path for a store that does not use Google Tag Manager, on every platform except Shopify. It takes three pieces of code in your store's templates: the install snippet on every page, a call on your order confirmation page, and a call where shoppers add to the cart. With Google Tag Manager, use Install with Google Tag Manager instead: two templates do the same with no code. On Shopify, follow the Shopify guide.

1. Paste the install snippet

Open the site in the dashboard and go to Site settings > Installation. In the Install the tag card, choose Show the snippet. The snippet appears with your site's public key (pk_site_…) already in it. Copy it.

The Install the tag card with Show the snippet open: the snippet, carrying an example site key, and its copy button, highlighted.

Paste it once in the template shared by every page of your store, just before the closing </body> tag. Check that the order confirmation page uses that template too: the order call of the next step runs there.

The snippet defines the window.iadvize command queue, stores your site key, and loads the agent's tag only after the page has finished loading, so it never slows your page's first render. Calls you make before the tag has loaded wait in the queue and are sent once it loads. With iadvize_disable=1 in a page's address, the snippet loads nothing.

Everything else you can do with the snippet, such as opening the agent from your own button, telling it which page the shopper is on, or authorizing another domain, is in Embedding the agent. The tag only starts a conversation on an authorized domain.

2. Report each order

On your order confirmation page, call the transaction command once per completed order, with the order's reference, amount and currency:

iadvize('transaction', {
  orderRef: 'ORD-10432',
  amount: '129.90',
  currency: 'EUR',
})

Call it on every order, whether or not the shopper talked to the agent. The tag adds the conversation's key for you when there is one. For the rules on each field, what a refused call looks like and how to check one call, see The transaction command. To send orders from your server instead, use the server API.

3. Report each add-to-cart

Where your store handles an add to cart (the button handler, or where it pushes its GA4 add_to_cart event), call the addToCart command once per cart line added:

iadvize('addToCart', {
  item_id: 'SKU-4821',
  quantity: 2,
  price: '39.90',
  currency: 'EUR',
})

Without it, the add-to-cart figures of the Sales report that need them read Not measured, and a holdout test cannot start. Orders are not affected. For the fields, how the amount is computed and how to avoid counting an add twice, see The addToCart command.

4. Check it in the dashboard

On Site settings > Installation:

  • Install the tag shows the tag's status, in its Tag on your site row. Every hour, the agent loads your homepage and looks for your site key in its HTML, so the status reads Detected after the first check that runs once the snippet is live. Check now runs the check on request. See Check that the tag is detected for each status.
  • Track your sales shows two rows, Orders received and Add-to-carts received. Each one reads that nothing was received yet until the first order or add arrives from your store, then the date and time of the latest one. A row that says recording is off means Record orders from your store or Count add-to-carts on your pages is off in Site settings > Site access (see The two switches).

The Orders received and Add-to-carts received rows of the Track your sales card, highlighted, each with the date and time of the latest one and the status Receiving.

A test order counts like a real one, and there is no way to delete it. Use a low amount, or a site you keep for testing. See Measure your sales for how an order is linked to a conversation, and the limits.