Skip to main content

Web Chat Events: DataLayer Integration & Tracking

Learn how Qualimero publishes Web Chat events to the dataLayer with QLM prefix for tracking.

Updated over 2 weeks ago

Web Chat Events: DataLayer Integration & Tracking

Qualimero automatically publishes all Web Chat events to the browser's dataLayer, making it easy to track user interactions through Google Tag Manager, analytics platforms, and other tracking tools.

🎯 Event Prefix

All Qualimero events are prefixed with QLM to ensure clear identification and avoid conflicts with other tracking implementations.

πŸ“Š Web Chat Events

The following events are automatically pushed to the dataLayer when users interact with your Web Chat:

QLM_WebBubble_Loaded

Triggered when your page loads and the Web Chat widget code is initialized. If the widget is placed behind a cookie banner, this event fires only after cookies are accepted.

QLM_Click_WebChat

Triggered when a user clicks on the Web Chat bubble. This event also fires when the chat opens automatically through the AutoOpen feature.

QLM_Agent_Started

Triggered when the user sends their first message to the AI Agent.

QLM_Link_View

Available for Product Advisory use cases only
Triggered when product recommendations are displayed to the user.

QLM_Link_Click

Available for Product Advisory use cases only
Triggered when the user clicks on one of the recommended products.

QLM_Agent_Completed

Available for Lead Generation and Recruiting use cases only
Triggered when the user completes all required fields and a lead is successfully generated.

πŸ”— Included Tracking Parameters

Every event automatically includes the following tracking parameters when available:

  • UTM Parameters (utm_source, utm_medium, utm_campaign, etc.)

  • URL Parameters (custom query strings from your landing page)

  • Click IDs: GCLID (Google Ads), FBCLID (Facebook Ads), and other platform identifiers

This ensures full attribution tracking across your marketing channels without additional configuration.

βš™οΈ Required Script for Tracking

To enable event tracking, you must include the Qualimero Analytics script in the <head> section of every page on your website β€” even pages where the Web Chat widget itself is not active.

<script defer src="https://cdn.qualimero.com/qualimero-analytics-1.0.js"></script>

Important: Without this script, events will not be published to the dataLayer.

πŸ›  Implementation Example

Here's a complete implementation example:

<!DOCTYPE html>
<html>
<head>
  <title>My Website</title>
  
  <!-- Qualimero Analytics Script -->
  <script defer src="https://cdn.qualimero.com/qualimero-analytics-1.0.js"></script>
  
  <!-- Qualimero Web Chat Configuration -->
  <script>
    window.qualimeroConfig = {
      phoneNumber: "xxx",
      aid: "your-account-id"
    };
  </script>
  <script defer src="https://cdn.qualimero.com/qualimero-widget-1.0.js"></script>
</head>
<body>
  <!-- Your page content -->
</body>
</html>

πŸ“ˆ Using Events in Google Tag Manager

Once the analytics script is installed, you can create triggers in Google Tag Manager based on these events:

  1. Go to Triggers in GTM

  2. Create a new trigger with type Custom Event

  3. Enter the event name (e.g., QLM_Agent_Started)

  4. Use the trigger in your tags for conversion tracking, remarketing, or analytics

πŸ“¦ DataLayer Structure

Events are pushed to the dataLayer in the following format:

{
  event: "QLM_Agent_Started",
  utm_source: "google",
  utm_medium: "cpc",
  utm_campaign: "spring_campaign",
  gclid: "abc123...",
  // additional parameters
}

You can access these values in GTM using dataLayer variables.

βœ… Checklist

Before going live, make sure:

  • βœ“ Analytics script is installed in the <head> on all pages

  • βœ“ Web Chat widget is configured correctly

  • βœ“ GTM triggers are set up for relevant events

  • βœ“ Conversion tracking is connected to QLM_Agent_Completed or QLM_Link_Click

  • βœ“ Events are firing correctly (test using GTM Preview Mode)

πŸ“ž Need Help?

If you need assistance setting up event tracking or integrating with your analytics platform, reach out to our support team.

Did this answer your question?