For product analytics and insights on how users use our app, we decided to integrate
@posthog and the results are pretty good.
They have excellent SDK support for popular frameworks, which I used to install it within 5 minutes in our React Native app and our Next JS powered website.
With generous free tier as well as extremely well made tools like creating funnels, insights and dashboards with multiple visualisation graphs like Bar chart, Area chart by using the custom events we send to posthog and app related metrics like Lifecycle events like App open, logging the screens where the user has navigated, it is one of the best tools out there.
We now have insights into every important feature we provide in our app with ability to query the events with HogQL/ SQL queries.
From a developer standpoint, their dashboard feels a bit overwhelming just like AWS dashboard.
But once you get a hang over it, you would have upskilled yourselves with product analytics concepts as I did this week, to know how to properly integrate product analytics for your SAAS app and show proper insights to make important business decisions as you grow and improve conversions due to more visibility on how users use your app.
---
To user their React Native SDK, they mention to install async storage but we do not use that as it is slower than MMKV which is superior alternative.
If you are using Posthog with your react native app, use the following code snippet, to use a custom storage solution with your PostHog Provider in your App.js (or your entry file.)
import {MMKV} from 'react-native-mmkv';
export const posthogMMKV = new MMKV({id: 'yourCustomId'});
export const posthogMMKVStorage = {
setItem: (key, value) => {
posthogMMKV.set(key, value);
},
getItem: key => {
const value = posthogMMKV.getString(key);
return value === undefined ? null : value;
},
removeItem: key => {
posthogMMKV.delete(key);
},
};
<PostHogProvider
// Other relevant props
options={{
customStorage: customMMKVStorage,
}}></PostHogProvider>;
Their docs did mention a customStorage prop but not how to use MMKV with it.
I found a way to make it work properly and it works very well.
MMKV is 1000 times faster than LocalStorage, so your app will feel more snappier with this customStorage prop.
Let me know if you use posthog for your app and web product analytics.