Docs/Installing the RetentionMaster Snippet

Installation

Installing the RetentionMaster Snippet

Install the RetentionMaster tracking snippet directly or through Google Tag Manager so website events can reach your workspace.

Snippet format

Each site uses a public key in a script tag: <script src="https://retentionmaster.io/public/snippet.js" data-site="PUBLIC_KEY"></script>.

The loader reads the data-site value, loads the site-specific snippet response, initializes the runtime, and queues early RMTrack calls until the full tracker is ready.

Direct installation

Place the script before the closing body tag or through your CMS global header/footer manager. Keep one RetentionMaster snippet per site to avoid duplicate page_view and trigger events.

After publishing, open the website once in a normal browser session so the runtime can request its configuration and send the first page_view event.

What starts tracking automatically

The runtime records page_view as a canonical fact and can emit configured triggers such as exit_intent, leave attempt, inactivity, rapid scroll, and retention asset telemetry when those rules are enabled for the site.

Frequently Asked Questions

Where do I find the public key?

Open Workspace Settings or the workspace switcher install flow. The UI shows the public key and a copyable snippet for the selected site.

Can the snippet be installed with GTM?

Yes. Use a Custom HTML tag for the master snippet, then publish the container and verify installation from RetentionMaster.