Do I need to change my backend code?
Do I need to change my backend code?
Can I test Analytiq without deploying my app?
Can I test Analytiq without deploying my app?
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.How long before I see data on the dashboard?
How long before I see data on the dashboard?
track() call is sent immediately and shows up within seconds.What is the API key? Is it safe to put in frontend code?
What is the API key? Is it safe to put in frontend code?
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.What happens if I call track() before init()?
What happens if I call track() before init()?
init() is called, all queued events are sent immediately. You won’t lose any events.Does Analytiq work with TypeScript?
Does Analytiq work with TypeScript?
@types/analytiq. Just import { track } from 'analytiq' and TypeScript will auto-complete everything correctly.Will Analytiq slow down my app?
Will Analytiq slow down my app?
Can I track users who are not logged in?
Can I track users who are not logged in?
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.What if a user's internet goes down mid-session?
What if a user's internet goes down mid-session?
Where do I find my API key?
Where do I find my API key?
Can I use yarn or pnpm instead of npm?
Can I use yarn or pnpm instead of npm?
- npm:
npm install analytiq - yarn:
yarn add analytiq - pnpm:
pnpm add analytiq
Can I use Analytiq without npm (plain HTML website)?
Can I use Analytiq without npm (plain HTML website)?
Do I need to call init() on every page?
Do I need to call init() on every page?
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.What does reset() do exactly?
What does reset() do exactly?
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.Why do I see duplicate events on the dashboard?
Why do I see duplicate events on the dashboard?
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.