๐Ÿงช Test Page - Trace Analytics

This page demonstrates the trace analytics script in action.

๐Ÿ“‹ Quick Start

Embed this script on your website:

๐Ÿ”ง Current Testing Setup

<script> // Currently using trace.js for both local and production testing const script = document.createElement('script); script.src = '/latest/trace.js?v=' + Date.now(); document.head.appendChild(script); </script>

Testing Phase: Using trace.js for both environments to verify functionality

Production vs Development

Development:<script> // Override for local development (optional) window.traceAnalyticsConfig = { apiBaseUrl: 'http://localhost:3000', debugMode: true }; const script = document.createElement('script'); script.src = '/latest/trace.js'; document.head.appendChild(script); </script>

Optional local override, defaults to production

Production:<script> // Production configuration window.traceAnalyticsConfig = { apiBaseUrl: 'https://trace.nokhaos.com', debugMode: false }; // Production script from CDN const script = document.createElement('script'); script.src = 'https://trace.nokhaos.com/latest/trace.min.js'; document.head.appendChild(script); </script>

Production API endpoints, optimized

๐Ÿ” How to Monitor Tracking

  1. Open your browser's Developer Tools (F12)
  2. Go to the Network tab
  3. Look for a POST request to /api/track
  4. Click on it to see the tracked data payload

๐ŸŽฏ UTM Parameter Testing

Try visiting this page with UTM parameters to test attribution tracking:

With UTM ParametersFull UTM SetAttribution Parameters

๐Ÿ“Š Data Collected

The tracker automatically collects:

๐Ÿ“ Page Information

  • URL and path
  • Page title
  • Referrer
  • Domain

๐ŸŒ Browser Data

  • Browser type & version
  • Operating system
  • Language settings
  • User agent

๐Ÿ“ฑ Device Info

  • Device type
  • Screen dimensions
  • Viewport size
  • Timezone

๐ŸŽฏ Marketing

  • UTM parameters
  • Attribution data
  • Campaign tracking
  • Session data

๐Ÿ”ง Troubleshooting

If you don't see tracking requests:

  1. Check that your Supabase credentials are configured in .env.local
  2. Ensure the web_events table exists in your database
  3. Look for any JavaScript errors in the Console tab
  4. Verify the tracker script is loading (check Sources/Elements tab)

โ† Back to Home