Skip to main content
The SDK repository includes complete example applications demonstrating various features.

Browser Examples

Location: /examples/browser-test.html Demonstrates:
  • SDK initialization
  • User identification
  • Event tracking
  • Page tracking
  • Interactive testing UI
Running the example:
  1. Open examples/browser-test.html in a browser
  2. Enter your API key
  3. Test different tracking methods

Location: /examples/browser-test-dev.html Pre-configured example for development:
  • Uses dev API endpoint
  • Includes test API key
  • Ready to test immediately

Node.js Examples

Location: /examples/node-test.js Demonstrates:
  • SDK initialization
  • User identification
  • Event tracking
  • Page and screen tracking
  • Group tracking
  • Proper shutdown with flush
Running the example:
cd examples
npm install
node node-test.js

Test Server

Location: /examples/test-server.js Local HTTP server to inspect requests:
  • Logs all incoming requests
  • Shows request headers and body
  • Useful for debugging
Running the server:
cd examples
node test-server.js