
Add an analytics tool
1
Create an account with the provider
Sign up with the analytics tool and create a project there. Note the project key or measurement ID, and which region the project is in (US or EU).
2
Ask the agent
Name the tool in your project chat, for example:The agent installs the SDK, initializes it once at app start, and adds the events you describe.
3
Enter your key
The agent opens a secure dialog for the key. Keys meant to be public, such as a PostHog project key or a GA4 measurement ID, are saved with a
VITE_ prefix (web) or EXPO_PUBLIC_ prefix (mobile) and ship in your app, which is what those keys are for. Secret keys are stored as project secrets and only used from a Supabase Edge Function.4
Check that events arrive
Open your preview, click around, and look for events in the provider’s live or debug view. Standard reports can lag by hours.
If you already have the key, you can add it yourself first: open the project name menu → Project settings → Secrets, add it under the exact name the provider’s SDK expects, and then ask the agent to wire the integration.
Choosing a tool
These are the tools the agent is most familiar with. It can wire others too; describe the one you use.
Amplitude’s API key is secret, so your app sends events to a Supabase Edge Function, which forwards them to Amplitude. That also lets the function attach the signed-in user’s ID instead of trusting whatever the client sends. For GA4 on mobile, Google’s path is Firebase, which Vibely doesn’t set up.

Tips that save a debugging session
PostHog: events never show up
PostHog: events never show up
The host is region-specific:
https://us.i.posthog.com or https://eu.i.posthog.com, matching where you created the PostHog project. Pointing an EU project at the US host drops every event without an error, so the dashboard just stays empty.Also call posthog.identify(user.id) after sign-in and posthog.reset() on sign-out, or every visitor merges into one anonymous person.GA4: bounce rate is almost 100%
GA4: bounce rate is almost 100%
gtag records a page view only on the first page load. Vibely apps change routes without reloading, so the app needs to send a page_view event on every route change. Ask the agent to “send a GA4 page view on every route change”.GA4 standard reports lag up to 24 hours. Use DebugView or Realtime in GA4 to check that events arrive.Amplitude: events are rejected
Amplitude: events are rejected
Every event needs a
user_id or device_id, and user_id must be at least 5 characters. EU accounts must send to https://api.eu.amplitude.com/2/httpapi, because the US endpoint rejects an EU key. Rejections come back as a 400 response, so ask the agent to log non-200 responses from the Edge Function.Numbers don't match between tools
Numbers don't match between tools
Ad blockers drop a noticeable share of analytics requests, and each tool counts sessions differently. Never use analytics counts for billing or access decisions.
Mobile apps: declare analytics in the stores
Shipping an analytics SDK in a native build means you collect usage data, and both stores require you to say so:- App Store: declare it in the privacy nutrition label under Usage Data, and Identifiers if you send a user ID.
- Google Play: declare it in the Data safety form under App activity.
Related
Built-in analytics
Visitor stats for your published web app, with no setup.
Monitoring
Runtime errors from your live app, which analytics won’t show you.