Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
57290e3
feat(analytics): hierarchical groups support
tylerjroach Nov 2, 2026
7ed18ce
feat(analytics): return null from getCompany when there is no company
tylerjroach Nov 2, 2026
07fbf2c
feat(flags): send $user_id and $company_id in hierarchical groups fla…
tylerjroach Nov 2, 2026
d63f933
feat(analytics): reject list groups in trackWithGroups on hierarchica…
tylerjroach Nov 2, 2026
8e3a039
fix(analytics): keep a company handle's own company and send only the…
tylerjroach Nov 4, 2026
bc66184
fix(analytics): keep the opt-out delete when a /groups batch is sending
tylerjroach Nov 4, 2026
7bd1584
fix(analytics): keep the opt-out delete when a /groups batch is rejected
tylerjroach Nov 4, 2026
5c9f562
chore: merge master into hierarchical-groups
tylerjroach Nov 4, 2026
52c136f
fix(analytics): send identify(identity) to the native SDK right away
tylerjroach Nov 4, 2026
83eb0ae
fix(analytics): opt out before sending the hierarchical groups user d…
tylerjroach Nov 5, 2026
c2d5263
fix: keep the distinct id getter instead of deprecating it
tylerjroach Nov 5, 2026
ce482e9
chore: replace the hierarchical groups demo project token with a plac…
tylerjroach Nov 5, 2026
37b6570
fix(flags): send no distinct_id with hierarchical groups first-time e…
tylerjroach Nov 5, 2026
1e579a7
fix: send no distinct_id with identified hierarchical groups events
tylerjroach Nov 6, 2026
c07301f
fix: track no $identify on hierarchical groups projects
tylerjroach Nov 6, 2026
5a4b564
refactor: leave deviceId off the MixpanelIdentity passed to identify()
tylerjroach Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Samples/MixpanelExample/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import {
View,
} from 'react-native';
import {Mixpanel} from 'mixpanel-react-native';
import HierarchicalGroupsPage from './HierarchicalGroupsPage';

const trackAutomaticEvents = true;
const mixpanel = new Mixpanel('Your Project Token', trackAutomaticEvents);

function App(): React.JSX.Element {
const [isInitialized, setIsInitialized] = useState(false);
const [showHierarchicalGroups, setShowHierarchicalGroups] = useState(false);

useEffect(() => {
const initializeMixpanel = async () => {
Expand Down Expand Up @@ -60,6 +62,12 @@ function App(): React.JSX.Element {
mixpanel.reset();
};

if (showHierarchicalGroups) {
return (
<HierarchicalGroupsPage onBack={() => setShowHierarchicalGroups(false)} />
);
}

return (
<SafeAreaView style={styles.container}>
<StatusBar barStyle="dark-content" />
Expand Down Expand Up @@ -92,6 +100,11 @@ function App(): React.JSX.Element {
onPress={resetUser}
disabled={!isInitialized}
/>
<View style={styles.spacer} />
<Button
title="Hierarchical Groups"
onPress={() => setShowHierarchicalGroups(true)}
/>
</View>

<View style={styles.info}>
Expand Down
Loading
Loading