Docs › Getting started

Google Tag Manager

Install through GTM without touching your website code.

If your website uses Google Tag Manager, you can install SitePluse without changing your website's code.

Use the GTM version of the code. GTM rewrites <script src> tags and removes custom attributes such as data-site, so pasting the direct code into a Custom HTML tag won't record anything. The GTM version below builds the tag itself and works reliably, even with a strict Content Security Policy.

Steps

  1. In SitePluse, open your website's Settings → Tracking code and switch to the Google Tag Manager tab. Copy the code.
  2. In GTM, go to Tags → New, choose Custom HTML and paste the code.
  3. Under Triggering, choose All Pages (or Initialization – All Pages).
  4. Save, then click Submit → Publish. Preview mode alone doesn't publish the tag for real visitors.

The GTM code looks like this:

<script>
(function(){var s=document.createElement('script');s.async=true;
 s.src='https://www.sitepluse.io/rx.js';s.setAttribute('data-site','YOUR_SITE_KEY');
 document.head.appendChild(s);})();
</script>

If your cookie banner is managed in GTM, you can either fire the tag only after consent (using your consent tool's trigger), or let SitePluse wait for consent itself. See Cookie consent. Don't do both with different rules, or you may record less than you expect.

Sending events from GTM

You can send events from any Custom HTML tag that fires after the main tag:

<script>
  window.RX && RX('event', '{{Event}}');
</script>

More in the JavaScript API guide.

Can't find what you need? E-mail session@sitepluse.io.