← All platforms

Install guide

Install Tapestry on Google Tag Manager

Works with no code changes, at the cost of a little flicker.

The snippet

Replace SITE_KEY with your site's key, or open this guide from your site's page in Tapestry to see it filled in.

<script src="https://cdn.patchwork.run/s/SITE_KEY.js"></script>

Steps

  1. In your container, go to Tags → New → Tag configuration → Custom HTML.
  2. Paste the snippet into the HTML box.
  3. Under Triggering, choose Initialization - All Pages so it fires as early as GTM allows.
  4. Save, then Submit and Publish the container. GTM injects the tag into the page's <head>.
Tag Manager loads asynchronously, so Tapestry starts after the page has begun to render. Some visitors will briefly see the original section before the variant replaces it (flicker), which can bias results. Use it to get started, and move the snippet into your site's <head> directly when you can.

Check it worked

Load any page of your site. Within a minute your site's page in Tapestry switches from “Waiting for install” to “Installed”, and you can start your first experiment.