Skip to main content

How to Install Your Script via Google Tag Manager

Step-by-step guide to installing the Retention.com script on your site using Google Tag Manager — no copy-paste required.

Install the Retention.com tracking script on your site using Google Tag Manager — Retention handles the tag, trigger, and container publish automatically. No copy-paste required.


Before you begin

You'll need:

  • A Google Tag Manager account with at least one container set up, and a Google account that has publish access to that container (read-only access is not enough — you'll get an error during install)

  • Access to your Retention.com account (Settings → Scripts on Site)

💡 Which Google account should I use? Use the Google account that has publish access to your GTM container — not necessarily the email you used to sign up for Retention. If you manage GTM under a work Google account, use that one when authorizing.


Installation steps

1. Go to Scripts on Site

In your Retention.com account, go to Settings → Scripts on Site, or open the script install step in onboarding.

2. Select Google Tag Manager

Choose Google Tag Manager as your install method. You'll be prompted to authorize with Google.

3. Authorize with Google and pick a container

Sign in with your Google account and select the GTM container where the script should be installed.

4. Retention does the rest

Retention automatically creates a tag using the built-in All Pages trigger (so the script fires on every page of your site) and publishes a new container version.

⚠️ Heads up on publishing: This creates a new version in GTM and publishes it live. Any other unpublished changes already sitting in your workspace will also go live at the same time. Check your workspace for pending changes before authorizing if that's a concern.

💡 Already have a Retention tag? If a Retention tag already exists in your GTM workspace, the flow will detect it and offer to update it, skip, or get help — so nothing gets duplicated.

5. Your domain is verified instantly

On successful install, your domain is marked as verified immediately — no need to wait for live visitor traffic.


Frequently asked questions

Which Google account should I authorize with?

Use the Google account that has publish access to your GTM container. If you're not sure which one that is, go to GTM → Admin → User Management to confirm which email has the right permissions.

What trigger does Retention use?

The script is set to fire on all pages using GTM's built-in All Pages trigger. This is intentional — Retention needs to run on every page to identify returning visitors, including product, collection, and checkout pages.

Will this affect other tags already in my container?

The install adds one new tag and trigger, then publishes the container. If you have other unpublished changes sitting in your workspace, they will also go live at the same time. Check your workspace for pending changes before authorizing if that's a concern.

I already have a Retention tag in GTM from a previous install. Will this create a duplicate?

No — the flow detects an existing Retention tag and gives you the option to update it, skip it, or get help instead of creating a second one.

What happens after install — do I need to do anything in GTM?

Nothing. Retention publishes the container version automatically. You can confirm the install worked by checking that your domain shows as verified in Settings → Scripts on Site.

The install said it succeeded but my domain isn't verified. What's wrong?

Try refreshing the Scripts on Site page. If it still shows unverified after a minute, check GTM to confirm the new version was actually published — go to GTM → Versions and look for the most recent publish timestamp.

Do I need a GTM account before I start?

Yes — you'll need an existing GTM account, but you can either use a container you already have or create a new one through our UI. If you don't have a GTM account yet, set one up first: create the account, add a container, and install the GTM snippet on your site. Once that's done, come back to this step.

My GTM container isn't showing up in the dropdown. What do I do?

Make sure the Google account you authorized with actually has access to that container. You can verify in GTM under Admin → User Management. If the container belongs to a different Google account, sign out and re-authorize with the correct one. If you've confirmed the right account and the container still isn't showing, reach out to support.


What to do next

→ Connect your email platform: How to Connect Your Email Platform

→ Learn how contacts sync: How Contacts Sync to Your Email Platform

Did this answer your question?