HelpAlive installs entirely in the browser. There’s nothing to deploy on your servers. You add one script tag (or one Google Tag Manager tag) and oneDocumentation Index
Fetch the complete documentation index at: https://docs.helpalive.com/llms.txt
Use this file to discover all available pages before exploring further.
identify() call after login. That’s the whole install.
This page covers:
- Where to find your personalized snippet
- Installing via JavaScript script tag
- Installing via Google Tag Manager
- Identifying users and workspaces
- Framework-specific examples (React, Vue, Angular, plain HTML)
- Content Security Policy configuration
- Verifying the integration
Find your personalized snippet
Your dashboard generates a snippet with your API key already filled in. You can grab it from two places:- First-time setup: the Setup Guide modal opens automatically the first time an admin logs in. It walks you through script install,
identify(), and verification — same three steps as below. - Anytime after: Settings → Integration & API Key. The integration health card shows whether your script is connected and surfaces the CSP directives you’ll need.
YOUR_API_KEY is replaced with your project’s actual key in the dashboard copy.
JavaScript script tag
The simplest method. Paste the snippet into the<head> of your HTML, just before </head>, so it loads on every page.
| Attribute | Required | What it does |
|---|---|---|
data-api-key | Yes | Your project’s API key from Settings → Integration & API Key. |
async | Recommended | Loads the script asynchronously so it doesn’t block your page render. |
data-debug | No | Set to "true" to log SDK activity to the browser console (development only). |
Google Tag Manager
If you already manage scripts through GTM, use this method. It’s a two-tag setup — one for the SDK, one foridentify().
1. The HelpAlive tag
In Google Tag Manager: Tags → New → Tag Configuration → Custom HTML. Paste:2. The identify() tag
Add this to your app code right after the user logs in. It pushes the required identity into the GTM Data Layer so the second tag (below) can forward it to HelpAlive:
helpalive_identify.
For each helpalive_* field, create a Data Layer Variable in GTM (Variables → New → Data Layer Variable, version 2). The variable name must match the data layer key exactly.
Click Submit in GTM to publish the container, then verify from your HelpAlive dashboard.
GTM can’t call JavaScript functions directly from your app. The Data Layer is GTM’s standard pattern for passing data into tags — same pattern Mixpanel, Amplitude, and Segment use.
Identify your users and workspaces
identify() is the only line of code you write yourself. It tells HelpAlive who the user is and which workspace they belong to, and it’s required before any activity is recorded.
| Field | Required | What it’s for |
|---|---|---|
userId | Yes | Your app’s stable user ID. Avoid using email if it can change. |
tenantId | Yes | Workspace or organization ID. For B2C apps without workspaces, pass "default". |
tenantName | No | Display name for the workspace. Shown in the dashboard instead of the raw ID. |
displayName | No | Full name (e.g. firstName + " " + lastName). |
email | No | User’s email — used for display and search. |
role | No | User’s role (e.g. "admin", "editor", "viewer"). Helps segment behavior by permission level. |
plan | No | Subscription tier (e.g. "free", "pro", "enterprise"). Enables plan-segmented insights. |
createdAt | No | When the user signed up. Helps the Agent tailor its tone for new vs. seasoned users. |
Framework examples
The pattern is the same everywhere: install the script once on app load, callidentify() after the user authenticates.
- HTML
- React
- Vue
- Angular
Content Security Policy
If you ship a CSP header, allow the HelpAlive origins:helpalive.js or Content Security Policy means CSP is blocking the script.
Verifying the integration
Once you’ve deployed:- Visit a few pages in your app while logged in.
- Open your dashboard’s Setup Guide (or Settings → Integration & API Key).
- The Verify Connection panel polls every few seconds and shows three checks:
| Check | What it means | What to do if it fails |
|---|---|---|
| Event ingestion | Your script loaded; events are arriving. | If pending after 10 minutes, check CSP and that the build with the snippet is deployed. |
| Identity coverage | We’re receiving userId and tenantId. | If pending, your identify() call isn’t running. Verify it fires after login on every authenticated page. |
| Profile enrichment | Optional fields (displayName, email) are flowing. | Optional, but improves Agent personalization. Add the fields to your identify() call. |
What gets captured automatically
Once the script andidentify() call are in place, the SDK auto-captures:
- Pageviews — including in-app navigations (single-page apps work out of the box).
- Clicks — buttons, links, and other interactive elements.
- Form events —
form_start(first interaction),form_submit(submission). Field values are never captured. - Rage clicks — repeated clicks on the same element. A strong frustration signal.
- DOM errors — JavaScript exceptions and console errors that happened while the user was active.
- Scroll depth — per-page max scroll percentage.
identify().
Privacy by default
Personal data is removed in the browser before anything is sent, and again on our servers before anything is stored. HelpAlive never captures what users type into inputs, the values inside forms, or any password fields. See Privacy for the full picture.Next steps
Identify users
Field reference, anonymous sessions, workspace switching.
Configure consent
Pause tracking until your cookie banner returns a decision.
Set up the Agent
Train the AI assistant on your docs.
Privacy posture
What we capture, what we don’t, and where redaction happens.

