Product Intelligence

Setup Across Multiple Places

User journeys span more than one file. Signup, invite, login, and feature usage each live in a different part of your codebase — here's how the prompt covers all of them.


The prompt runs once per codebase. It reads your entire repo and instruments every place where a user action happens — signup, login, invite, feature use. But your signup might be in a different file than your login, your invite flow might be in a separate service, or your backend might handle registration while your frontend handles the rest. This page shows what that looks like and how to handle each case.

Where events live in your codebase

Each user flow maps to a specific file or handler. The prompt finds and instruments all of them.

your-app/
app/
auth/
signup.tsx
login.tsx
logout.tsx
invite.tsx
features/
dashboard.tsx
reports.tsx
settings.tsx
api/
auth.ts
users.ts
layout.tsx
Events that fire here
auth/signup.tsx
signed_up account_created account_added_user identify group
auth/login.tsx
identify signed_in
auth/logout.tsx
signed_out
auth/invite.tsx
invite_sent account_added_user
features/dashboard.tsx
feature_used
features/reports.tsx
feature_used
api/auth.ts
signed_up identify if backend handles auth
The prompt finds all of these automatically — run it once on this repo.

What if a flow lives in a completely separate service?

Run the prompt once per codebase that owns events. Use the same API key in all of them.

Same repo — different file or folder

Signup in auth/signup.tsx, invite in settings/team.tsx, features scattered across components — all in one repo.

your-app/
signed_up account_created signed_in invite_sent feature_used signed_out

Run the prompt once. It searches the whole repo and instruments every handler it finds.

Separate frontend repos — e.g. main app + admin portal

Your customer-facing app and your internal admin tool live in different codebases.

main-app/ Repo 1
identify signed_in feature_used signed_out
+
admin-app/ Repo 2
account_created invite_sent account_added_user

Open each repo separately in your AI assistant and run the product prompt in each one. Use the same API key in both.

Separate backend service — Node, Python, Go, Ruby…

Signup and account creation happen server-side in a dedicated API. The frontend only handles what users do after they're logged in.

backend-api/ Repo 1
signed_up account_created account_added_user group
frontend-app/ Repo 2
identify signed_in feature_used signed_out

Run the same product prompt on each repo separately. On the backend repo, the AI will detect there's no browser context and automatically instrument via HTTP calls instead of a script tag. Use the same API key in both.

Third-party identity provider — Okta, Auth0, SAML…

Auth is handled entirely by an external provider. Your app receives a session after the provider completes authentication.

Okta / Auth0 External
handles auth internally
your-app/ Repo 1
identify signed_in signed_up first login only

You can't instrument the provider's code. Run the product prompt on your own app — the AI will find the OAuth callback handler (the point where your app gets the session) and instrument it there.

Same API key across all services. Use the same environment's API key everywhere so ThriveStack can join events from different services to the same user and account. See Environments and API Keys.