Getting Started Guide ~12 min read

Understand Your Visitors with Widget Analytics

When a visitor opens your chat widget, wouldn't it be helpful to know what pages they've viewed, how long they've been browsing, and what caught their attention? Converge's widget analytics gives your support team this context automatically—no complicated setup required. In this guide, you'll learn what's tracked, how privacy is protected, and how to add custom tracking for deeper insights.

What You'll Learn

Automatic Behavior Tracking

Page views, scroll depth, session duration, and widget interactions are tracked without any code changes.

Privacy-First Design

How Converge respects Do Not Track settings, avoids third-party cookies, and keeps data on your instance.

Custom Tracking

Add click tracking with HTML attributes and track custom events with a simple JavaScript API.

What's Tracked Automatically

Once you embed the Converge widget on your website, these events are tracked automatically without any additional code:

Event Description Data Collected
session_start Visitor arrives on your site Whether they're a returning visitor
session_end Visitor leaves your site Total duration, time spent in other tabs
page_view Visitor views a page URL, page title, path
page_exit Visitor leaves a page URL, time spent on page
scroll_depth Visitor scrolls the page Milestones: 25%, 50%, 75%, 100%
page_hidden Visitor switches to another tab Current URL
page_visible Visitor returns to your tab How long they were away
widget_opened Visitor opens the chat widget Current URL
widget_closed Visitor closes the chat widget Current URL
form_started Visitor starts filling a form Form ID and name (not field values)
section_viewed Page section becomes visible (50%+ in viewport) Section name/ID, URL
section_exit Visitor scrolls away from a section Section name/ID, time visible
Pro Tip: All events include context like referrer, screen resolution, language, timezone, and UTM campaign parameters when available.
Success Check: These events start tracking automatically once the widget is installed—no configuration needed.

Privacy & Compliance

Converge analytics is designed with privacy as a core principle. Here's how we protect your visitors while still giving you valuable insights:

Do Not Track Respected

If a visitor has enabled Do Not Track (DNT) in their browser, all analytics tracking is automatically disabled. No events are collected or sent.

No Third-Party Cookies

The widget uses only a first-party cookie to identify returning visitors. No tracking cookies are shared with third parties.

First-Party Data Only

All analytics data is stored on your Converge instance. We don't aggregate or share visitor data across customers.

Data Minimization

We only collect behavioral data (pages viewed, clicks, scrolls). Personal information is only collected if the visitor explicitly provides it through the chat.

GDPR Ready

With DNT support and first-party-only data storage, Converge analytics can be part of a GDPR-compliant setup when paired with proper consent mechanisms on your site.

Note: While Converge provides privacy-respecting analytics, you should still include analytics disclosure in your site's privacy policy and implement cookie consent banners as required by your jurisdiction.

Success Check: Analytics tracking automatically respects Do Not Track and stores all data on your Converge instance only.

Adding Click Tracking

Want to know which buttons, links, or elements visitors click before chatting? Add the data-cv-track attribute to any element you want to track.

Basic click tracking

Add data-cv-track with a descriptive name:

<button data-cv-track="pricing_cta">View Pricing</button>

<a data-cv-track="download_guide" href="/guide.pdf">Download Guide</a>

<div data-cv-track="feature_card">
  <h3>Enterprise Plan</h3>
  <p>For growing teams</p>
</div>

When clicked, a click event is recorded with:

  • element — The value of data-cv-track
  • tag — The HTML tag (button, a, div, etc.)
  • text — First 100 characters of the element's text content
  • url — The current page URL

Adding custom data to clicks

Use data-cv-data to include additional properties as JSON:

<button 
  data-cv-track="add_to_cart" 
  data-cv-data='{"product_id": "SKU-123", "price": 99.99, "category": "software"}'
>
  Add to Cart
</button>

<a 
  data-cv-track="plan_selected"
  data-cv-data='{"plan": "enterprise", "billing": "annual"}'
  href="/checkout"
>
  Choose Enterprise
</a>
Pro Tip: Use descriptive, consistent names for data-cv-track values. Names like "cta_hero_signup" are more useful than "button1".
Success Check: Click any tracked element, then view the visitor's Customer Journey in Converge to see the click event.

Section Visibility Tracking

Converge automatically tracks when page sections become visible in the visitor's viewport. This helps you understand which content they actually saw before starting a conversation.

How section tracking works

The widget uses an IntersectionObserver to detect when elements are 50% or more visible on screen. It automatically tracks:

  • Elements with id attribute<section id="pricing">, <article id="features">
  • Elements with data-cv-section — Overrides the id if present

Best practices for section tracking

Add meaningful IDs to your page sections:

<section id="hero">
  <h1>Welcome to Our Product</h1>
</section>

<section id="features">
  <h2>Features</h2>
</section>

<section id="pricing">
  <h2>Simple Pricing</h2>
</section>

<section id="testimonials">
  <h2>What Customers Say</h2>
</section>

<section id="faq">
  <h2>Frequently Asked Questions</h2>
</section>

Or use data-cv-section for custom names:

<div data-cv-section="social-proof">
  <h2>Trusted by 10,000+ Companies</h2>
</div>

<div data-cv-section="comparison-table">
  <h2>See How We Compare</h2>
</div>

Events recorded: section_viewed when the section enters the viewport, and section_exit with time visible when they scroll away.

Success Check: You can now see which sections visitors engaged with before they started chatting.

Custom Event Tracking

For events that can't be captured with HTML attributes—like video plays, form submissions, or purchase completions—use the JavaScript API.

The Converge.track() API

Once the widget is loaded, window.Converge provides a track method:

// Basic event
window.Converge.track('video_played', {
  video_id: 'intro-video',
  duration: 120
});

// Purchase completed
window.Converge.track('purchase_completed', {
  order_id: 'ORD-456',
  total: 299.99,
  items: 3,
  currency: 'USD'
});

// Form submission
window.Converge.track('contact_form_submitted', {
  form_type: 'demo_request',
  company_size: '50-100'
});

// Feature usage
window.Converge.track('feature_used', {
  feature: 'export_report',
  format: 'pdf'
});

Example integrations

Video Player (HTML5)

const video = document.querySelector('video');

video.addEventListener('play', () => {
  window.Converge.track('video_started', {
    video_id: video.dataset.videoId,
    title: video.dataset.title
  });
});

video.addEventListener('ended', () => {
  window.Converge.track('video_completed', {
    video_id: video.dataset.videoId,
    watch_time: video.currentTime
  });
});

Signup Flow

// When user starts signup
window.Converge.track('signup_started', {
  plan: 'professional',
  source: 'pricing_page'
});

// When signup completes
window.Converge.track('signup_completed', {
  plan: 'professional',
  billing: 'annual',
  trial: true
});
Pro Tip: Keep event names consistent (snake_case) and properties meaningful. Your support team will thank you when they can see exactly what a visitor was doing.
Success Check: Call window.Converge.track() from your application code to send custom events.

How Analytics Work Under the Hood

Understanding how events flow from your website to Converge helps you debug issues and optimize tracking.

1

Event Queuing

Events are stored in localStorage, surviving page refreshes and navigation. The queue holds up to 100 events before older ones are dropped.

2

Batch Sending

Events are sent to the server every 30 seconds or when 10 events accumulate—whichever comes first. This reduces network requests while keeping data fresh.

3

Reliable Delivery on Exit

When the visitor leaves your site, remaining events are sent using navigator.sendBeacon(), which ensures delivery even as the page unloads.

4

Visitor Linking

All events include a visitor ID (from a first-party cookie) and customer ID (once they start chatting), linking anonymous browsing to identified conversations.

SPA (Single Page Application) Support

If your site is a Single Page Application (React, Vue, Next.js, etc.), the widget automatically detects page changes by:

  • Listening to popstate events (browser back/forward)
  • Intercepting history.pushState and history.replaceState
  • Tracking accurate time spent on each virtual "page"
Pro Tip: No extra configuration is needed for SPAs. The widget handles route changes automatically.

Viewing Analytics in Converge

Analytics data appears in the Converge dashboard as part of the customer's profile, giving your team context when responding to conversations.

Customer Journey panel

  1. 1
    Open a conversation with a widget customer

    Click any customer who contacted you through the chat widget.

  2. 2
    Open the customer details panel

    Click the info icon in the conversation header to show the right panel.

  3. 3
    Find the Customer Journey section

    Scroll down to see their browsing history organized by session.

Customer Journey panel showing session timeline with page views, scroll depth milestones, click events, and widget opens

What you'll see

Session Overview

  • • Total sessions and page views
  • • Widget open count
  • • Session duration

Event Timeline

  • • Color-coded event icons
  • • Page URLs visited
  • • Time spent on each page
  • • Scroll depth milestones
Pro Tip: Click on a session to expand its event timeline. This shows you exactly what the visitor did before chatting—helpful for understanding their question.
Success Check: You can now view visitor behavior directly in conversations to provide more informed support.

Best Practices

Track meaningful interactions, not everything

Focus on key conversion points: CTAs, pricing clicks, feature exploration. Too many events create noise.

Use descriptive, consistent names

Adopt a naming convention like category_action (e.g., pricing_cta_clicked, video_started). Your future self will thank you.

Add IDs to important page sections

Section tracking works automatically for elements with IDs. Add id attributes to hero, features, pricing, testimonials, and FAQ sections.

Monitor session duration for engagement

Short sessions might indicate confused visitors; long sessions before chat suggest research-mode customers with specific questions.

Use custom data for context

When tracking clicks, include relevant context with data-cv-data: product IDs, prices, plan names. This enriches the Customer Journey view.

Respect user privacy preferences

Converge respects Do Not Track automatically, but also consider pausing custom tracking until users consent via your cookie banner.

What's Next?

Now that analytics are set up, explore related features:

  • Widget Guide — Install and customize the chat widget on your website
  • Leads Guide — Turn tracked visitors into scored leads automatically
  • Inbox Guide — Master the unified inbox where you'll see Customer Journey data

Need more help?

Our support team is here for you. Click the chat widget in the bottom right corner to start a conversation.

We typically respond within minutes during business hours.