Help us improve
Share bugs, ideas, or general feedback.
From expo-rn-plugin
Load analytics standards for this React Native / Expo project. Covers event naming, user identification, screen tracking, and privacy rules. Default provider is Firebase Analytics; PostHog and Amplitude are supported alternatives.
npx claudepluginhub ksairi-org/claude --plugin expo-rn-pluginHow this skill is triggered — by the user, by Claude, or both
Slash command
/expo-rn-plugin:analyticsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply the following analytics standards to all code in this project.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
Share bugs, ideas, or general feedback.
Apply the following analytics standards to all code in this project.
Default: Firebase Analytics (@react-native-firebase/analytics) — already in the Firebase MCP stack.
Alternatives:
| Provider | Package | When to prefer |
|---|---|---|
| Firebase Analytics | @react-native-firebase/analytics | Default — integrates with existing Firebase setup |
| PostHog | posthog-react-native | Product analytics, feature flags, session replay |
| Amplitude | @amplitude/analytics-react-native | Enterprise, cohort analysis, behavioral funnels |
Never call the provider SDK directly in components. Always go through a central src/analytics/index.ts:
// src/analytics/index.ts
import analytics from '@react-native-firebase/analytics';
export const Analytics = {
identify: (userId: string) => analytics().setUserId(userId),
reset: () => analytics().setUserId(null),
screen: (name: string) => analytics().logScreenView({ screen_name: name, screen_class: name }),
track: (event: string, params?: Record<string, string | number | boolean>) =>
analytics().logEvent(event, params),
};
This lets you swap providers without touching call sites.
snake_case for all event names: item_purchased, form_submitted, onboarding_completedauth_login_success, payment_sheet_openedprofile_updated, push_enabledWire to the Expo Router navigation state — do not call Analytics.screen() manually in each screen:
// app/_layout.tsx
import { usePathname } from 'expo-router';
import { useEffect } from 'react';
import { Analytics } from '@/analytics';
export function AnalyticsProvider({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
useEffect(() => { Analytics.screen(pathname); }, [pathname]);
return <>{children}</>;
}
// After successful sign-in
Analytics.identify(user.id);
// On sign-out
Analytics.reset();
Never identify before auth completes. Clear on sign-out.
identify() must be your internal opaque ID (UUID) — not email or phoneIf the project uses PostHog or Amplitude instead of Firebase, ask for the relevant implementation pattern and it will be provided on demand.