Skip to main content
No. The Analytiq SDK runs entirely in the browser (frontend). Your backend — whether it’s Express, Django, Laravel, or anything else — doesn’t need any changes. The SDK sends events directly from the user’s browser to Analytiq’s server.
Yes. Just run your app locally with npm run dev. Events sent from http://localhost will appear on your Analytiq dashboard in real time. No GitHub push or deployment needed — as long as your internet connection is working, it works.
Within 5-10 seconds. Events appear on your dashboard in real time. There is no delay or batching — every track() call is sent immediately and shows up within seconds.
Your API key starts with pk_live_ — the pk stands for “public key”. It is designed to be used in browser code. It’s safe to put it in your frontend without risk. It identifies your project, but does not give anyone access to your Analytiq account or your users’ data.
The event is automatically queued in memory. The moment init() is called, all queued events are sent immediately. You won’t lose any events.
Yes, fully. TypeScript type definitions are built into the package — you don’t need to install @types/analytiq. Just import { track } from 'analytiq' and TypeScript will auto-complete everything correctly.
No. All network requests are asynchronous — they run in the background and never block your app’s UI. The SDK is also extremely lightweight (under 5KB).
Yes. You don’t have to call identify(). Events without a user identity are tracked as anonymous visitors. You’ll see the events on your dashboard, just without a specific user attached to them.
The SDK will retry the failed request once after 500ms. If the retry also fails, the event is dropped. Events are not persisted to disk — if the browser is closed before retry, the event is lost.
Log in to your Analytiq dashboard, click your project, click Settings in the sidebar, scroll to Public API Key, click Reveal, and then click Copy.
Yes. All three work identically with Analytiq:
  • npm: npm install analytiq
  • yarn: yarn add analytiq
  • pnpm: pnpm add analytiq
Yes. Use the CDN version — no npm or Node.js required. Paste this in your HTML:
<script type="module">
  import { init, track } from 'https://cdn.jsdelivr.net/npm/analytiq/dist/index.js'
  init('pk_live_YOUR_KEY')
  track('page_view')
</script>
No. Call init() once in your root entry file (src/main.jsx for React, pages/_app.tsx for Next.js). It stays initialized for the entire session.
reset() clears the user identity set by identify(), empties the event queue, and clears the deduplication cache. Call it when a user logs out so the next user’s events aren’t accidentally attributed to the previous user.
The most common cause is calling init() more than once. Make sure init() is only called in one place — your app’s root entry file. If your framework re-renders the root component multiple times, wrap init() in a check.