Skip to main content
If your team manages scripts in Google Tag Manager, you can add HelpAlive there. You need three Custom HTML tags in Tag Manager, and two events that your app pushes to the data layer. This page shows how to set it up.

Prerequisites

  • Tag Manager is already on every page of your app.
  • Your project key, from Settings → Setup & API Key. It is public and safe to put in a tag.
  • A developer who can add two dataLayer.push calls to your app: one after login, one at logout.
  • If your users must accept a cookie banner before tools like this run, fire the HelpAlive tag only after they accept. See Consent.
  • Don’t fire the HelpAlive tag on any page that shows data our Terms of Service say HelpAlive must not receive. Hiding the agent on Controls isn’t enough: activity is still recorded.

How to set up HelpAlive in Tag Manager

1

Add the HelpAlive tag

In Tag Manager, go to Tags → New → Custom HTML. Paste this, replace YOUR_PROJECT_KEY with your key, and set the trigger to All Pages.
The setup page shows this tag with your key already in it, under Google Tag Manager.
2

Push the signed-in user to the data layer, from your app

Run this right after login, and on every page load while the user stays signed in. Keep every line: for a value this user doesn’t have, push undefined. Tag Manager keeps the last value pushed. If you leave out a line, that field keeps the previous user’s value.
The user id and the person’s name are always required. A tenant is the company, workspace or account a user belongs to in your app. In a B2B app, the tenant id and name are required too. Push undefined for users with no tenant.
3

Create a Data Layer Variable for each field

In Tag Manager, go to Variables → New → Data Layer Variable (version 2). Create one variable for each helpalive_ name you push, and give it that same name. Tag Manager won’t publish a tag that names a variable you haven’t created.
4

Add a second tag that passes it on

Add another Custom HTML tag, triggered by the custom event helpalive_identify. Delete the lines for fields you don’t push.
The first line lets this tag run before the HelpAlive script has loaded. Keep it.
5

Forget the user at logout

Push this in your logout code, and wherever your app ends a session. Keep it apart from the identify push.
Then add a third Custom HTML tag, triggered by the custom event helpalive_reset:
6

Submit the container

Press Submit in Tag Manager to publish the three tags.

Verify users through Tag Manager

Once your server makes user tokens (see Verify users), pass the token through the data layer. Create a Data Layer Variable named helpalive_user_token, then add these lines:

Content Security Policy

If your app sends a Content Security Policy, it must already allow Tag Manager’s Custom HTML tags. Add our sources as well:
If your policy has only default-src, add the sources to it instead. Content Security Policy explains each source and shows an example.

Check it works

  1. Open Tag Manager’s Preview mode on your app and sign in. Check that the helpalive_identify event fires the identify tag.
  2. Open your app, sign in and click around, then come back to Settings → Setup & API Key. Step Add HelpAlive to your app gets a check.
  3. Log out in Preview mode and check that helpalive_reset fires the reset tag.

Why won’t Tag Manager publish the identify tag?

The tag names a variable you haven’t created. Create each helpalive_ Data Layer Variable, or delete its line from the tag.

Why does the identify tag fire, but nobody is recognized?

HelpAlive received an empty user id. Check that your push sets helpalive_user_id before the helpalive_identify event, and that the Data Layer Variable has exactly that name. To see the reason, add s.setAttribute("data-debug",""); to the loader tag while you test, and read the browser console.

Why does the previous user’s chat stay open after logout?

The helpalive_reset push or its tag is missing. Add both, and publish the container.

Next

Identify users

What each field means.

Verify users

Sign each user id on your server.

Troubleshooting

When the agent doesn’t appear.
Last modified on November 25, 2026