REAL-TIME TELEMETRY ENGINE 1.8KB Script • Instant GeoIP Resolution • Conversion Tracking • Stateless REST API
Knowledge Base & Technical FAQ

Frequently Asked Questions

Everything you need to know about embedding tracker.js, tracking conversions, resolving GeoIP locations, and automating Teeya Analytics with Stateless Secret API Keys.

1. Tracker Script & Installation

How do I install Teeya Analytics on my website?

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.

Does 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.

2. Custom Events & Conversion Tracking

How do I track conversions and monetary revenue?

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.

Can I attach custom JSON properties to events?

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.

3. Stateless Secret-Key REST API

How does the Stateless Secret-Key API work?

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.

Can I programmatically add websites and fetch their tracker script via the API?

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/.

4. GeoIP Resolution & Privacy

How does Teeya resolve visitor countries and cities without cookies?

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.