Install the container on your site

Add the WTM snippet to every page once, list your domains, then publish a version: your tags run from then on.

Web
On this page
  1. Add the snippet
  2. Allowed domains
  3. Send your own events
  4. Publish

Add the snippet

Put this line in the <head> of every page of your site, replacing WTM-AB2CD34 with your container id:

<script async src="https://t.woosool.com/c/WTM-AB2CD34.js"></script>

For visitors without JavaScript you can also add, right after <body>:

<noscript><img src="https://t.woosool.com/n/WTM-AB2CD34.gif" alt="" width="1" height="1"></noscript>

The script is small, loads asynchronously and is cached; it never slows the page down while it loads.

Tip

Sites built with Wajha will be able to add their container from the site settings, without touching any code.

Allowed domains

List your site’s domains in the container (an exact host such as shop.example.com, or *.example.com for every subdomain). The consent log only accepts choices sent from these domains.

Send your own events

Your pages can push events and values into the data layer, before or after the script has loaded:

<script>
  window.wtm = window.wtm || [];
  wtm.push({ event: 'purchase', value: 12 });
</script>

A custom event trigger named purchase then runs the tags you attached to it.

Publish

Changes stay in a workspace until you publish them. Publishing creates a version and sends it to an environment:

  • live is what your visitors get;
  • staging and custom environments are loaded with their own snippet address (it adds ?env= and a private auth= key), so you can test a version on a test site first.

Visitors get the new version within about five minutes (the script is cached for that long). To undo a change, publish the earlier version again.

Note

t.woosool.com sets no cookie. Cookies that tags need are set on your own domain, and only once the visitor’s consent allows them.