๐Ÿ“Š
Traffic Tracker
Home
Pricing
Integration Guide
Sign InSign Up
Traffic Tracker Enterprise
Privacy-focused website analytics platform with AI insights, real-time monitoring, and enterprise features.
Developed byGRAYSPACEgrayspace.co.ke
ยฉ 2025โ€ขAll rights reserved
Integration Guide
โ† Back to Home

๐Ÿ”ง Integration Guide

Step-by-step instructions to integrate our tracking script into your website

๐Ÿš€ Quick Start (30 seconds)

1. Copy the tracking code

<!-- Traffic Tracker Configuration --> <script> // Set your tracking code (REQUIRED - get this from your dashboard) window.TRACKING_CODE = 'YOUR_TRACKING_CODE_HERE' </script> <!-- Use the tracker script --> <script src="https://webtraffictracker.vercel.app/tracker.js" defer></script>

2. Add it to your website's <head> section

Paste the code just before the closing </head> tag in your HTML.

<!DOCTYPE html> <html> <head> <title>Your Website</title> <!-- Traffic Tracker Configuration --> <script> // Set your tracking code (REQUIRED - get this from your dashboard) window.TRACKING_CODE = 'YOUR_TRACKING_CODE_HERE' </script> <!-- Use the tracker script --> <script src="https://webtraffictracker.vercel.app/tracker.js" defer></script> </head> <body> <!-- Your website content --> </body> </html>

๐Ÿ”ด Real-time Analytics Verification

After adding the tracking script, you can verify that real-time analytics are working:

โœ… How to Verify Real-time Analytics

  1. Open your dashboard and navigate to the Analytics page
  2. Visit your tracked website in a new browser tab
  3. Watch the dashboard - you should see live updates within seconds
  4. Check browser console - look for "SSE connection opened" messages
  5. Test multiple pages - navigate between pages on your site

๐Ÿšจ Troubleshooting

  • If you see "ERR_BLOCKED_BY_CLIENT" errors, the new SSE implementation should resolve this
  • Make sure your site is using the latest tracking script from your dashboard
  • Check that the tracking code is placed in the <head> section before other scripts
  • Verify your site is added to the dashboard and is active

๐Ÿ›  Platform-Specific Integration

๐Ÿ“„ HTML Websites

For static HTML websites, add the script tag to your head section.

<script src="https://webtraffictracker.vercel.app/tracker.js" defer></script>

๐Ÿ”Œ WordPress

Add to your theme's header.php file or use a plugin.

<!-- Add before </head> in header.php -->

โš›๏ธ React/Next.js

Add to your _document.js or _app.js file.

<Script src="https://webtraffictracker.vercel.app/tracker.js" strategy="afterInteractive" />

๐Ÿ›’ Shopify

Add to your theme.liquid file in the head section.

<!-- Add to theme.liquid -->

โœ… Verification & Testing

๐Ÿ” Check Console

Open browser DevTools and look for tracking messages.

๐Ÿ“Š Tracking page view: https://yoursite.com

๐Ÿ“Š Check Dashboard

Visit your website and check if data appears in the dashboard. Sign in to view your analytics.

Sign In to View Dashboard

๐Ÿงช Test Page

Use our test page to verify the integration is working.

Test Integration

๐Ÿ”ง Troubleshooting

โŒ No data in dashboard

  • Check if script is in the <head> section
  • Verify the script URL is correct
  • Check browser console for errors
  • Ensure JavaScript is enabled

โš ๏ธ CORS errors

  • Check if your domain is allowed
  • Verify HTTPS is enabled
  • Clear browser cache
  • Try incognito mode

๐Ÿ’ก Still having issues?

Contact our support team for personalized help.

๐Ÿ†˜ Need More Help?

Our team is here to help you get started quickly and easily.