analytics.jsx file, Analytiq will:
- Safely initialize your tracking across any React/Next.js environment
- Tie perfectly into your own custom Authentication system
- Save events when users go offline and retry later
- Deduplicate accidentally repeated events
Step 1 — Create your account & project
- Go to analytiq-two.vercel.app/register and create your account.
- Click New Project, give it a name, and click Create.
Step 2 — Get your API Key
- Click on your project to open it
- Go to Settings in the left sidebar
- Scroll to Public API Key and click Reveal
- Copy your key (it looks like
pk_live_xxxxxxxxxxxxxxxxxx)
Step 3 — Install the SDK
Open your terminal inside your project’s frontend folder and run:- npm
- yarn
- pnpm
Step 4 — The One-File Setup
You only need to set up Analytiq once in your entire app by creating a central tracking file. Create a file calledanalytics.jsx (or .tsx) anywhere in your project. We highly recommend placing it next to your other providers or in your src/ folder.
This file acts as a bridge between Your Auth System and Our SDK.
- React (Vite/CRA)
- Next.js (App Router)
- Vue / Vanilla JS
Create Then, open your root
src/analytics.jsx. Customize the useAuth() import to point to whatever authentication system you use (Firebase, Supabase, Custom JWT, etc).src/analytics.jsx
App.jsx or main.jsx and wrap your app in the AnalyticsProvider you just created. Make sure it goes inside your Auth provider!src/App.jsx
Step 5 — Track Events!
Analytiq relies entirely on manual tracking. We don’t automatically guess what a user did; you explicitly tell the SDK when something important happens. Just importtrack from the analytics.jsx file you created in Step 4, and drop it anywhere you need it.
LandingPage.jsx
AnalyticsProvider is active and your API key is correct, the event will instantly appear on your dashboard.
What’s next?
Track Custom Events
Learn more about adding properties to your
track() calls.All Framework Guides
Detailed, step-by-step setup guides for every framework.
API Reference
Full documentation for the
useAnalytiq hook and core functions.