Jetrack

Jetrack

Features

Real-Time Analytics

Monitor live visitor activity as it happens

Real-time analytics shows you exactly who's on your site right now, updating automatically as visitors arrive, navigate, and leave. No refreshing needed, just live data flowing into your dashboard.

What Is Real-Time?

Real-time analytics gives you a live count of active visitors currently browsing your website. This updates every few seconds via a WebSocket connection, giving you instant visibility into your site's activity.

What Counts as "Active"?

A visitor is considered active if they've had any activity in the last 30 seconds:

  • Loaded a page
  • Triggered a custom event
  • Sent a heartbeat signal (automatic every 15 seconds while page is visible)

If there's no activity for 30 seconds, they're no longer counted as active.

Viewing Real-Time Data

Dashboard Display

The live visitor count appears prominently at the top of your website dashboard as a large number with a green indicator showing the connection status.

What You'll See:

  • Green dot - Real-time connection active
  • Live count - Number of current visitors
  • Real-time updates - Count changes as visitors arrive/leave

Where to Find It

  1. Go to Dashboard → Your website
  2. Look at the top section of your dashboard
  3. The live visitor count is displayed with a pulsing green indicator

How It Works

The Technology

Real-time tracking uses a combination of technologies:

Heartbeat System:

  • Every 15 seconds, your tracking script sends a lightweight "heartbeat" ping
  • This only happens when the page is visible (not minimized or in background tab)
  • Heartbeats pause when the user switches tabs or minimizes the browser
  • Resume automatically when the user returns

WebSocket Connection:

  • Your dashboard maintains a persistent WebSocket connection to our servers
  • When heartbeats arrive, the server broadcasts updates to connected dashboards
  • Updates are near-instant (typically under 1 second latency)
  • Connection automatically reconnects if dropped

Redis Caching:

  • Active visitors are tracked in Redis with a 30-second TTL (time-to-live)
  • When a heartbeat arrives, the visitor's TTL is refreshed
  • If no heartbeat for 30 seconds, the visitor automatically expires
  • This ensures accurate counts without manual cleanup

The Flow

  1. Visitor arrives → tracking script loads → heartbeat starts
  2. Every 15 seconds → heartbeat sent to server → TTL refreshed in Redis
  3. Server counts → scans Redis for all active visitors for your website
  4. WebSocket broadcast → sends updated count to all connected dashboards
  5. Dashboard updates → your browser displays the new count (no refresh needed)

Use Cases

Launch Monitoring

Monitor a product launch in real-time:

  • Watch visitor count spike when you share the link
  • See immediate social media impact
  • Track campaign performance as it happens
  • Spot issues early if numbers are lower than expected

Campaign Validation

Confirm your marketing campaigns are driving traffic:

  • Email sent? Watch visitors arrive in real-time
  • Social post published? See the immediate response
  • PPC ads running? Verify clicks are converting to visits
  • Influencer mention? Track the traffic spike

Event Tracking

Monitor live events:

  • Webinar attendance
  • Flash sale traffic
  • Limited time offers
  • Live stream concurrent viewers

Team Collaboration

Share the dashboard with your team:

  • See collective impact of marketing efforts
  • Celebrate traffic milestones together
  • Spot and respond to traffic anomalies quickly
  • Make data-driven decisions in real-time

Understanding the Numbers

Why the Count Might Seem Low

Remember, real-time shows active visitors right this second, not total visitors for the day:

  • A visitor who landed 2 minutes ago but hasn't moved? Not counted (no recent heartbeat)
  • Someone reading an article for 5 minutes? Counted (heartbeats every 15 seconds)
  • User minimized their browser? Not counted (heartbeats pause)
  • Visitor on a different page of your site? Counted (as long as page is active)

Comparing to Historical Data

Real-Time: Active visitors right now Historical: Total unique visitors over a time period

Example:

  • Real-time: 5 active visitors
  • Last 24 hours: 1,234 total visitors

This is normal! Not all 1,234 visitors are on your site simultaneously.

Heartbeat Details

What Gets Sent

Each heartbeat is a minimal payload:

{
  "apiKey": "your-website-id",
  "visitorId": "visitor-uuid",
  "url": "https://yoursite.com/page",
  "hostname": "yoursite.com",
  "eventType": 3
}

Note: eventType: 3 indicates a heartbeat (vs. 1 for pageview, 2 for custom event)

When Heartbeats Send

Heartbeats send every 15 seconds when:

  • ✅ Page is visible and focused
  • ✅ Browser tab is active
  • ✅ Window is not minimized

Heartbeats pause when:

  • ❌ User switches to a different tab
  • ❌ User minimizes the browser
  • ❌ User locks their computer
  • ❌ Page is in background/hidden

Heartbeats resume when:

  • ✅ User returns to the tab
  • ✅ User restores the window

Why 15 Seconds?

This interval balances:

  • Accuracy - Catches visitors who quickly browse and leave
  • Performance - Light enough not to impact server or bandwidth
  • Battery Life - Doesn't drain mobile batteries
  • Real-Time Feel - Updates feel instant to dashboard viewers

Connection Status Indicator

Green Dot (Connected)

Your dashboard is receiving real-time updates. The live count is current.

Gray Dot (Disconnected)

The WebSocket connection was lost. This can happen due to:

  • Network interruption
  • Server maintenance (rare)
  • Browser going to sleep (laptop lid closed)

What Happens:

  • Dashboard will automatically try to reconnect
  • Usually reconnects within seconds
  • You'll see the green light return when connection is restored

Manual Refresh: If you want to force a refresh, click the refresh button in your dashboard header.

Privacy & Performance

Privacy Considerations

Real-time tracking doesn't compromise visitor privacy:

  • Still uses anonymous visitor IDs (UUIDs)
  • No personal information in heartbeats
  • Heartbeats are minimal payload (< 200 bytes)
  • Same privacy standards as regular pageview tracking

Performance Impact

On Your Website:

  • Heartbeats are sent via navigator.sendBeacon() (non-blocking)
  • Fallback to async XHR if beacon unavailable
  • Total bandwidth: ~0.2 KB every 15 seconds per visitor
  • Zero impact on page rendering or user experience

On Your Dashboard:

  • WebSocket connection uses minimal bandwidth
  • Updates are pushed (no polling required)
  • Modern browsers handle this efficiently
  • No performance degradation even with dashboard open for hours

Advanced: Widget Display

Real-time counts can also be displayed via embeddable widgets. Widgets show:

  • Live visitor count
  • Auto-refreshing every 60 seconds
  • Customizable theme and styling
  • Can be embedded on any page (even external sites)

Comparison to Other Tools

vs. Google Analytics Real-Time

BrandJet:

  • True real-time (sub-second updates)
  • WebSocket-based (instant push notifications)
  • 30-second active window
  • Lightweight heartbeat system

Google Analytics:

  • Near real-time (5-10 second delay)
  • Polling-based (dashboard checks for updates)
  • 5-minute active window (less precise)
  • Heavier tracking payload

vs. Traditional Analytics

Real-Time Analytics:

  • Who's on your site right now
  • Instant feedback on campaigns/changes
  • Great for monitoring launches and events
  • Shows current activity

Historical Analytics:

  • Total visitors over time periods
  • Trends and patterns
  • Comparative analysis
  • Strategic decision-making

You need both! Real-time for immediate insights, historical for long-term strategy.

Troubleshooting

Real-Time Count Shows 0

Check:

  1. Is your tracking script installed and working?
  2. Are you (or someone) actively on your site?
  3. Is the page visible (not minimized or in background tab)?
  4. Check browser console for JavaScript errors (F12)
  5. Verify heartbeats are being sent (Network tab → Filter by WS or XHR)

Connection Keeps Dropping

Common causes:

  • Unstable internet connection
  • Firewall blocking WebSockets
  • VPN interference
  • Corporate network restrictions

Solution:

  • Check your network connection
  • Try a different network
  • Disable VPN temporarily
  • Use browser in non-restrictive environment

Count Seems Higher Than Expected

Possible reasons:

  1. Multiple people testing your site
  2. You have multiple tabs/devices open
  3. Bots (though we filter most)
  4. Someone left tab open and is actively on page

Remember: Each visitor ID per device counts separately.

Count Seems Lower Than Expected

Remember:

  • Only currently active visitors count
  • Minimized tabs don't send heartbeats
  • Background tabs are paused
  • 30-second activity window (strict)

This is intentional - we show truly engaged visitors, not just open tabs.

Best Practices

When to Check Real-Time

Good times to monitor:

  • Immediately after sending email campaigns
  • During social media posts/ads
  • Product launches and announcements
  • Live events and webinars
  • When testing new features/pages

Don't obsess:

  • Real-time is a snapshot, not the full picture
  • Historical data matters more for trends
  • Focus on overall growth, not minute-to-minute fluctuations

Using Real-Time for Testing

Real-time is perfect for verifying tracking works:

  1. Install tracking script
  2. Open dashboard in one tab
  3. Visit your site in another tab
  4. Within 15-30 seconds, you should see count increase to 1
  5. Navigate to another page
  6. Count should remain at 1 (same visitor)
  7. Close the tab
  8. Within 30 seconds, count should drop to 0

Next Steps

On this page