5 min read

Visitor Tracking

Track and understand your website visitors with CommFlow's real-time visitor analytics.

Visitor Tracking#

CommFlow automatically tracks visitors on your website, giving you valuable context when they start a conversation.

What Gets Tracked#

When a visitor loads your website with the CommFlow widget, the following information is collected:

Automatic Data Collection#

Data PointDescriptionExample
Current Page URLThe page they're viewing/pricing
ReferrerWhere they came fromgoogle.com
BrowserBrowser name and versionChrome 120
DeviceDevice typeDesktop, Mobile, Tablet
Operating SystemOS name and versionmacOS 14.0
Screen ResolutionDisplay size1920x1080
LocationGeographic location (by IP)New York, USA
TimezoneVisitor's timezoneAmerica/New_York
LanguageBrowser language settingEnglish (US)
Visit HistoryPrevious visits and pages5 visits, 12 pages

Session Information#

  • First Visit - When they first came to your site
  • Current Session Start - When this visit began
  • Pages Viewed This Session - Navigation path
  • Time on Site - Duration of current visit
  • Return Visitor - Whether they've visited before

Viewing Visitor Information#

During Conversations#

When chatting with a visitor, see their info in the right panel:

  1. Overview Tab

    • Name and email (if provided)
    • Location and timezone
    • Device and browser
  2. Activity Tab

    • Current page
    • Pages viewed this session
    • Navigation timeline
  3. History Tab

    • Previous conversations
    • Past visits
    • Total engagement time

In the Visitors Module#

Access detailed analytics at /visitors:

  • Active Visitors - Currently on your site
  • All Visitors - Historical visitor data
  • Visitor Lists - Custom segments

Real-Time Tracking#

Live Visitor Feed#

See who's on your site right now:

  1. Go to Visitors in the sidebar
  2. View the real-time list
  3. See current page, location, and status

Visitor Status Indicators#

StatusMeaning
Online (Green)Currently active on site
Idle (Yellow)On site but inactive
Offline (Gray)Left the site

Watch visitors navigate in real-time:

  • See page changes as they happen
  • Track scroll depth
  • Monitor engagement signals

Custom Visitor Data#

Setting Custom Properties#

Pass additional data about known visitors:

cf('setVisitor', {
  name: 'John Doe',
  email: 'john@example.com',
 
  // Custom properties
  customFields: {
    plan: 'Enterprise',
    accountId: '12345',
    company: 'Acme Inc',
    mrr: 299,
    signupDate: '2024-01-15'
  }
});

Tracking Custom Events#

Track specific actions on your site:

// Track page views with context
cf('track', 'page_viewed', {
  page: '/pricing',
  section: 'enterprise'
});
 
// Track feature usage
cf('track', 'feature_used', {
  feature: 'export',
  format: 'csv'
});
 
// Track conversions
cf('track', 'purchase', {
  plan: 'Pro',
  amount: 29.99,
  currency: 'USD'
});

Identifying Logged-In Users#

When a user logs into your app:

cf('identify', {
  userId: 'user_123',
  name: 'John Doe',
  email: 'john@example.com',
 
  // Link to your system
  traits: {
    accountId: 'acc_456',
    role: 'admin',
    plan: 'enterprise'
  }
});

Visitor Segments#

Creating Visitor Lists#

Organize visitors into segments:

  1. Go to Visitors
  2. Click Create List
  3. Set criteria:
    • Location (country, city)
    • Visit count
    • Pages viewed
    • Custom properties
    • Last seen date

Example Segments#

High-Intent Visitors:

  • Viewed pricing page
  • More than 3 page views
  • Time on site > 5 minutes

Enterprise Prospects:

  • Custom property: company_size > 100
  • Viewed enterprise features
  • Located in target regions

Returning Visitors:

  • Visit count > 3
  • Has provided email

Analytics & Reporting#

Visitor Metrics#

Track key metrics in the Visitors dashboard:

MetricDescription
Total VisitorsAll-time visitor count
Active NowCurrently on site
New vs ReturningFirst-time vs repeat visitors
Avg. Session DurationTime spent per visit
Pages per SessionEngagement depth
Conversation Rate% who start a chat

Export Data#

Export visitor data for analysis:

  1. Go to Visitors
  2. Apply filters as needed
  3. Click Export
  4. Choose format: CSV or JSON

Privacy & Compliance#

For GDPR/CCPA compliance:

cf('init', {
  workspaceId: 'YOUR_WORKSPACE_ID',
 
  // Require consent before tracking
  requireConsent: true,
 
  // Custom consent message
  consentMessage: 'We use cookies to improve your experience.',
 
  // Consent callback
  onConsent: function(granted) {
    if (granted) {
      // User accepted
    }
  }
});
 
// Later, after user consents
cf('consent', true);

Respecting Do Not Track#

cf('init', {
  workspaceId: 'YOUR_WORKSPACE_ID',
  respectDoNotTrack: true  // Honor browser DNT setting
});

Data Retention#

Configure how long visitor data is stored:

  1. Go to Settings > Privacy
  2. Set Visitor Data Retention
  3. Options: 30 days, 90 days, 1 year, or custom

Anonymizing IP Addresses#

For enhanced privacy:

cf('init', {
  workspaceId: 'YOUR_WORKSPACE_ID',
  anonymizeIp: true  // Masks last octet of IP
});

Integration with Other Modules#

Team Chat Integration#

When a visitor starts a chat:

  • Visitor context is attached to the conversation
  • Team members can see visitor info
  • Easy handoff with full context

Inbox Integration#

Visitor conversations flow into Inbox:

  • Create tickets from chat
  • Visitor history attached
  • Continue conversation via email

Troubleshooting#

Visitor Data Not Showing#

  1. Check widget installation - Is the script loading?
  2. Check ad blockers - May block tracking
  3. Check console errors - JavaScript errors
  4. Verify domain allowlist - Must match your domain

Location Inaccurate#

  • IP geolocation is approximate
  • VPN users show VPN server location
  • Some ISPs show regional, not city-level data

Custom Data Not Appearing#

  1. Verify cf('setVisitor') is called correctly
  2. Check that property names match
  3. Ensure data is set before conversation starts

Next Steps#

Was this page helpful?

Let us know if you found what you were looking for.