Install

Google Tag Manager

Use the URL form of the key. GTM strips data attributes.

GTM rewrites Custom HTML tags and drops data- attributes, so the standard snippet silently records nothing. Use this version instead, where the key travels in the URL:

<script src="https://replaycat.com/rc.js?site=YOUR_SITE_KEY"></script>
  1. In GTM go to Tags, click New, choose Custom HTML, and paste the line above.
  2. Trigger: All Pages.
  3. Save, then Submit and Publish the container.

Visitors who already had the site open keep the old container until they reload. Open your site in a fresh tab to test.

To identify users from GTM, add a second Custom HTML tag on your login event. It retries because GTM loads the tracker asynchronously:

<script>
(function(){var n=0;function t(){if(window.rc){rc('identify',{{userId}},{email:{{userEmail}}});}else if(n++<20){setTimeout(t,250);}}t();})();
</script>

{{userId}} and {{userEmail}} are Data Layer variables you push at login.