Everything you need to know about embedding tracker.js, tracking conversions, resolving GeoIP locations, and automating Teeya Analytics with Stateless Secret API Keys.
Add your website in the Dashboard (or via POST /api/v1/websites/) to receive your unique tracking ID (tya_site_...) and a one-line <script defer src="/tracker.js" data-site-id="tya_site_..."></script> tag. Paste it inside your site's <head> section and telemetry begins streaming immediately.
tracker.js work with React, Next.js, Vue, and Single-Page Applications (SPAs)?
Yes. tracker.js automatically hooks into the browser's history.pushState and window.onpopstate events. Every client-side route change is recorded accurately without requiring manual pageview calls.
You can trigger conversions either in JavaScript via window.teeya.conversion('Pro Checkout', { plan: 'annual', value: 49.00 }) or declaratively in HTML by adding data-teeya-conversion="Signup" to any button or link.
Yes! Both window.teeya.track(eventName, metadata) and window.teeya.conversion(goalName, metadata) accept arbitrary JSON metadata dictionaries that are stored alongside the session and returned in API responses.
Generate a secret API key (prefixed tya_...) in your Dashboard. Pass it in the Authorization: Bearer <API_KEY> or X-API-Key: <API_KEY> HTTP header. No cookies or CSRF tokens are required—we hash the token with SHA-256 and resolve your account statelessly on every request.
Yes. Send a POST /api/v1/websites/ request with {"name": "My Site", "domain": "example.com"}. The JSON response immediately returns the website's id (UUID), tracking_id, and ready-to-embed tracker_snippet. You can then query all traffic and GeoIP data at GET /api/v1/websites/<website_id>/analytics/.
When a beacon arrives at /api/v1/collect/, our server resolves the request IP into Country, ISO-2 Country Code, Region, and City, and computes a privacy-safe daily visitor hash. No tracking cookies are ever written to the visitor's browser.