Install Replayly with an HTML snippet
The primary Replayly integration is a first-party script tag you paste on your site. There is no separate plugin to buy for a generic HTML page, and this page documents that official path.
Last updated .
How to install the snippet
- Create a project in the Replayly dashboard and copy the public project key.
- Paste the script tag before the closing </head> or </body> tag on the pages you want to record, replacing the host and PROJECT_PUBLIC_KEY.
- Deploy the change, open the site, and use Verify installation on the project page to confirm events reach /api/ingest.
- Leave input masking on. Only append &dnt=0 on a test page if you must ignore Do Not Track while you check the player.
How this integration compares
| Topic | HTML snippet | Google Tag Manager | Not a plugin page |
|---|---|---|---|
| How you install it | Paste the official /t.js script tag into your template or layout, with your host and project key | Add the same official snippet as a Custom HTML tag and publish the container | There is no Replayly WordPress, Shopify, or Webflow plugin documented today |
| Where events go | Posted to the same origin at /api/ingest | Still the same tracker and the same /api/ingest endpoint | Native iOS or Android apps and email are out of scope |
| Privacy defaults | New projects mask input values and respect Do Not Track | The same Replayly defaults; GTM only delivers the script | A plugin page would not change those defaults if one existed later |
| When to choose it | You can edit the site template and want the tracker to load without a tag manager | Every third-party script already ships through a GTM container | Wait for a real plugin or official CMS guide before we publish one |
What the snippet does
The tracker is a small script served from your Replayly host at /t.js. The project id is read from the pid query parameter. Events are posted back to the same origin at /api/ingest, so you are not sending recordings to a third-party collector you cannot name.
New projects mask input values and respect Do Not Track. If you use a consent banner, wait to call window.replayly('consent') until the visitor agrees. Use the rr-block and rr-mask classes when a node should be hidden or have its text masked beyond the default input masking.
When to use the snippet instead of a tag manager
Use the HTML snippet when you can edit the site template or a layout file, or when you want the tracker to load without depending on a tag manager container. That is the most direct path and the one the install guide starts with.
If marketing already ships every third-party script through Google Tag Manager, use the Google Tag Manager integration instead of pasting a raw tag into the theme. Both paths load the same tracker; only the delivery mechanism changes.
A careful first install
Copy the snippet from the project page rather than reconstructing the URL by hand. The host must be your Replayly origin, and the pid must be that project’s public key. After you deploy, use Verify installation and confirm a session appears before you raise sampling or copy the tag to every template.
Content Security Policy must allow the script host and the ingest endpoint. If the script is blocked, the player stays empty and it will look like a Replayly outage. Single-page apps should keep the tag in the shell so client-side route changes still run under the same recorder; the snippet does not automatically wrap a separate mobile webview you never deployed it to.
Privacy settings you should not skip
Leave input masking on in production. The dnt=0 flag is a test-page override, not a default to copy into a live checkout. If you use a consent banner, call window.replayly('consent') only after the visitor’s choice is recorded. Use rr-block and rr-mask when a widget or a block of text should stay out of the recording even with the defaults on.
The signed-in dashboard has a project demo you can use after you create a project; that demo is not a public marketing URL. For the snippet itself, the install guide is the companion document, and the Google Tag Manager page covers delivery through a container rather than a second tracker.
Limits
The snippet records pages where it is actually present. It does not automatically cover native iOS or Android apps, emails, or pages you forgot to deploy. Content Security Policy must allow the script host and ingest endpoint. This is not a CMS plugin, and we do not publish a WordPress or Shopify plugin page until a real plugin exists.
Read the install guide, review product facts, or create a workspace.