Analytics & Monitoring
PostHog
Set up PostHog for analytics
Quick Start
1
First, go to the PostHog Setup and create an account.
2
After you create your account, you’ll see this screen.
Click the Product Analytics
button.
3
After you click the Product Analytics
button, you’ll see this screen and pick the React Native
option.
4
Copy the apiKey
and host.
5
Go to the .env
file and add this:
6
Then go to the app/_layout.tsx
file and add this:
app/_layout.tsx
7
And add this to the bottom of the app/_layout.tsx
file:
app/_layout.tsx
8
This is optional, but if you want to session replay, you can uncomment some of the following lines:
As a final step, go to the @services/posthog/posthogConfig.ts
file and you can uncomment some of the following lines.
9
That’s it. You are done. Capture even the Imagination!