Google Tag Manager

to add peasy to your Google Tag Manager project, follow the steps below:

<script>
  var script = document.createElement('script');
  script.src = "https://cdn.peasy.so/peasy.js";
  script.async = true;
  script.id = 'peasy-script';
  script.dataset.website-id = '<website_id>';
  document.getElementsByTagName('head')[0].appendChild(script);
</script>
  1. copy the snippet above, replacing <website_id> with your website id found in your dashboard.
  2. go to GTM and create a new tag and select Custom HTML tag type. GTM Tag Configuration
  3. paste your script into the HTML field.
  4. click on the Triggering section and set triggering to All pages. GTM Tag Configuration
  5. name your tag, save and publish your container.

that's it! peasy will now start tracking user interactions on your website.


next steps

learn how to track custom events in the custom events documentation.