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 Point | Description | Example |
|---|---|---|
| Current Page URL | The page they're viewing | /pricing |
| Referrer | Where they came from | google.com |
| Browser | Browser name and version | Chrome 120 |
| Device | Device type | Desktop, Mobile, Tablet |
| Operating System | OS name and version | macOS 14.0 |
| Screen Resolution | Display size | 1920x1080 |
| Location | Geographic location (by IP) | New York, USA |
| Timezone | Visitor's timezone | America/New_York |
| Language | Browser language setting | English (US) |
| Visit History | Previous visits and pages | 5 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:
-
Overview Tab
- Name and email (if provided)
- Location and timezone
- Device and browser
-
Activity Tab
- Current page
- Pages viewed this session
- Navigation timeline
-
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:
- Go to Visitors in the sidebar
- View the real-time list
- See current page, location, and status
Visitor Status Indicators#
| Status | Meaning |
|---|---|
| Online (Green) | Currently active on site |
| Idle (Yellow) | On site but inactive |
| Offline (Gray) | Left the site |
Page Navigation Tracking#
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:
- Go to Visitors
- Click Create List
- 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:
| Metric | Description |
|---|---|
| Total Visitors | All-time visitor count |
| Active Now | Currently on site |
| New vs Returning | First-time vs repeat visitors |
| Avg. Session Duration | Time spent per visit |
| Pages per Session | Engagement depth |
| Conversation Rate | % who start a chat |
Export Data#
Export visitor data for analysis:
- Go to Visitors
- Apply filters as needed
- Click Export
- Choose format: CSV or JSON
Privacy & Compliance#
Data Collection Consent#
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:
- Go to Settings > Privacy
- Set Visitor Data Retention
- 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#
- Check widget installation - Is the script loading?
- Check ad blockers - May block tracking
- Check console errors - JavaScript errors
- 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#
- Verify
cf('setVisitor')is called correctly - Check that property names match
- Ensure data is set before conversation starts
Next Steps#
- Chat Widget - Configure the widget
- Visitors Analytics - Deep dive into analytics
Was this page helpful?
Let us know if you found what you were looking for.