What you need
How does it work?
Paste a single prompt into your AI coding assistant. The AI reads your codebase, asks a few clarifying questions, instruments every user lifecycle and feature event, and produces a verified 12-point checklist — all in about 2 minutes.
Step 0: Concepts
- Got a split codebase? If your signup, login, or feature flows live across multiple repos or a separate backend service, read the Multi-Repo & Split Flows guide before running the prompt.
- Understand event telemetry. Review the event taxonomy and
lifecycle-to-event mapping so you know which product actions emit
track,identify, andgroupcalls. Read Events Telemetry. - Environments and API Keys. Ensure product and marketing streams use the same environment key so data lands in the same workspace and correlation is possible. Read Environments and API Keys.
- Why Correlation Matters. Understand how shared
group_idjoins product usage with billing outcomes to unlock churn and expansion signals. Read Why Correlation Matters.
Step 1: Get your API key
Step 2: Copy the Prompt
Loading...
Step 3: Run it — what to expect
Open your repo in your AI coding assistant, paste the prompt, and run it. The AI follows a structured 5-phase process and stops to ask you questions before writing any code. Here's exactly what happens:
The AI reads your codebase, identifies your tech stack, auth library, and all instrumentable features. It then asks you three things before writing a single line:
- B2B or B2C? — Do users belong to accounts/organizations, or is each user their own account?
- Feature
classification — For every feature found: is it
core(primary value driver),sticky(habit-forming), orsupport(switching cost)? - Abuse email check — Should disposable/fake signup emails be blocked, flagged, or ignored?
Adds the ThriveStack SDK to your root layout once — never inside a component
or page. Writes your API key to the appropriate .env file.
Instruments identify, group,
signed_up, signed_in, signed_out,
account_created, account_added_user,
onboarding_step_completed, and invite_sent — in
the correct firing order for every auth flow found in your codebase.
Adds one feature_used call per confirmed feature action, using
the feature_type you provided in Phase 0.
The AI audits every instrumentation point and outputs a structured checklist directly in the chat. Every row shows ✅ implemented, ⚠️ partial, or ❌ missing — with the exact file and handler used.
The output you'll receive
| # | Event / Check | Status | Notes |
|---|---|---|---|
| 0 | script tag URL |
✅/⚠️/❌ | Exact src used |
| 1 | identify |
✅/⚠️/❌ | Field used, file |
| 2 | group |
✅/⚠️/❌ | Entity levels, billing root |
| 3 | signed_up |
✅/⚠️/❌ | Handler, file |
| 4 | signed_in |
✅/⚠️/❌ | Handler, file |
| 5 | account_created |
✅/⚠️/❌ | Handler, file or N/A |
| 6 | account_added_user |
✅/⚠️/❌ | Entry points covered |
| 7 | feature_used |
✅/⚠️/❌ | Features and their feature_type |
| 8 | invite_sent |
✅/⚠️/❌ | Handler, file or N/A |
| 9 | onboarding_step_completed |
✅/⚠️/❌ | Steps found or N/A |
| 10 | signed_out |
✅/⚠️/❌ | Handler, file |
| 11 | abuse_check |
✅/⚠️/❌ | block / flag / N/A |
Step 4: Confirm events are firing from your app
This step confirms the code is instrumented correctly — that the SDK calls actually fire when a user signs up, logs in, or uses a feature. At the end of Phase 5, the AI will ask you which option you prefer:
Open DevTools → Network tab → filter
by thrivestack. For each request, click it and verify the payload
contains event_name, user_id, and
context.group_id. Walk through each flow:
Register a new account. Expect: identify,
group, signed_up,
account_created, account_added_user — in that
order.
Sign in with an existing account, then sign out. Expect:
identify + signed_in on login;
signed_out on logout.
Use each instrumented feature. Expect one feature_used
track call per action, with feature_name and
feature_type in the payload.
Send a team invite. Expect: invite_sent with
invitee_email in properties. Then accept the invite as the
invitee — expect signed_up +
account_added_user with join_method: "invite".
Try signing up with a disposable email address (e.g. from
mailinator.com). If block was chosen: the form should
reject it. If flag was chosen: signup proceeds but the user is marked
for review.
Tell the AI your local dev URL (e.g. http://localhost:3000). The AI
will open your app, walk through signup and login, inspect the network requests,
and report back which events fired and which are missing — fixing any issues
automatically.
Only available in AI coding assistants with browser capability (e.g. Cursor, Windsurf, Claude).
Step 5: Verify your setup in ThriveStack
Once events are confirmed firing, check your setup status and monitor the live event stream in ThriveStack.
See which events ThriveStack has received and which are still missing. This is your ground truth for whether the instrumentation is complete — not just whether the code was written, but whether events are actually arriving.
A real-time stream of every event arriving in ThriveStack. Useful during local development to confirm calls are reaching the API, and ongoing after deployment to spot any gaps or regressions.
What did you just achieve? 🎆
Traditional product Analytics tools try to sell you a platform to track clicks and events, but you have to setup and configure separately. With AI coding assistants, ThriveStack automatically instruments and verifies the entire setup
- Various Product Analytics reports are now available. Refer your /home page to view the reports
- Account level Analytics, including 40+ metrics across Activation, Product Usage are available in the Full Journey CRM
| Feature | Traditional Product Analytics | ThriveStack Product Intelligence |
|---|---|---|
| Track events | Manual | Automatic |
| Track pages | Manual | Automatic |
| Track Growth events | Manual | Automatic |
| User Level Analytics | ||
| Account level analytics | 40-50% surcharge | Included |
| Full Bow-tie Journey | Buy multiple analytics tools | Included |
Note: You'll also receive an email notification summarising all events logged and any issues to fix.