Install through Google Tag Manager

Developer docs: all pages

Start

Help and docs

Changes

01Copy the saved widget tag

Copy the snippet from Locator → Widgets. You need edit access to the site’s GTM container and to the page template where the widget belongs. Keep data-embed and data-api-base as generated.

02Create a Custom HTML tag

In Google Tag Manager, choose Tags → New → Tag Configuration → Custom HTML and paste the tag. For a product page, replace the example code with a GTM variable such as {{Stockisto product code}}, populated from the current product. Set the variable before the tag fires.

<script
    src="https://cdn.test.stockisto.com/widget.js"
    data-api-base="https://api.test.stockisto.com"
    data-embed="we_0123456789abcdef0123456789abcdef"
    data-sku="{{Stockisto product code}}"
    data-view="inline"
    async
></script>

03Choose placement and a trigger

Add <div id="stockisto-inline"></div> to the product template where the widget belongs, and set data-view="inline" on the tag. GTM otherwise inserts the script away from your product panel. Use a trigger restricted to pages with that slot and a resolved product code. Fire once per page; avoid duplicate tags. Single-page navigation needs your site’s own teardown and remount integration.

04Preview, publish and check

Choose Preview and open two product pages. Check that the variable changes with the product, the slot contains one widget and the embed lookup succeeds. Then choose Submit → Publish. Reopen the published site without Preview and follow the installation checks.

05Send seller actions to GA4

Download the GTM container

  1. Set data-host-events="true" on the widget tag.
  2. In GTM, choose Admin → Import Container, select the file and choose Merge.
  3. Open the GA4 measurement ID variable and replace G-XXXXXXXXXX with your GA4 measurement ID.
  4. Choose Preview, allow analytics consent and click a seller action. Check stockisto_seller_action and its parameters.

Seller action fields