Airgentic Help
The Analytics tab of Service Configuration controls analytics integrations, optional durable chat sessions, and an optional external person identifier for Insights and CRM.
Push structured chatbot events to window.dataLayer on your website so your GTM container can forward them to GA4 or other analytics platforms.
| Setting | Description |
|---|---|
| Enable GTM dataLayer tracking | Master switch for the integration. Off by default. |
| Include question and answer text | Privacy-sensitive opt-in. Adds user questions and assistant answers to analytics events. Only available when GTM tracking is enabled. |
Both settings are stored in your service configuration as analytics.gtm_data_layer_enabled and analytics.gtm_include_conversation_data.
See Google Tag Manager Analytics for event schema, GTM setup guidance, and verification steps.
By default, each page load starts a new conversation. Turn this on when you want returning visitors on the same browser to continue where they left off after a refresh or navigation.
| Setting | Description |
|---|---|
| Restore the conversation after a refresh | Master switch. Off by default. |
| Keep the conversation for (hours) | How long the conversation id is kept in a first-party cookie (1–168 hours, default 24). Only editable when persist is enabled. |
When enabled, the widget stores the conversation id in a first-party cookie on your domain (et_session_id_<account>_<service>) and sends it back to Airgentic on the next visit. The server restores the visitor-visible transcript in the chat window.
Notes:
Stored as persist_session and persist_session_hours in your service configuration.
See also Website integration — persist chat.
Optionally read a first-party cookie from your website and send its value to Airgentic as user_id. This links chat activity in Insights to an identifier you already use (for example a Marketo or analytics cookie). When Visitor profile CRM sync is enabled, the same value can be written to HubSpot (airgentic_user_id) or Marketo (airgenticUserId).
| Setting | Description |
|---|---|
| User ID cookie | Exact cookie name on your site. Leave blank to skip. |
Notes:
user_id is only sent when this setting (or the embed attribute) is configured and the named cookie is present on the page.data-user-id-cookie on the Airgentic script tag overrides this service setting when both are set.user_id is a person identifier for Insights and CRM. It is separate from the chat session id (session_id). Do not use a CRM tracking cookie as the session key.Stored as user_id_cookie in your service configuration.
See Website integration — User ID cookie and Visitor Profiles and CRM for embed syntax and CRM property setup.