跳到正文
cccskills
免费在 GitHub 公开

integration-expo

Integrate PostHog analytics into Expo apps. Use for posthog-react-native setup, providers, screen tracking, env config, identify calls, and error tracking.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(8)

  • SKILL.md2.9 KB
  • references/basic-integration-1.0-begin.md2.1 KB
  • references/basic-integration-1.1-edit.md2.5 KB
  • references/basic-integration-1.2-revise.md937 B
  • references/basic-integration-1.3-conclude.md1.6 KB
  • references/EXAMPLE.md35.5 KB
  • references/identify-users.md8.1 KB
  • references/react-native.md43.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

PostHog integration for Expo

This skill helps you add PostHog analytics to Expo applications.

Workflow

Follow these steps in order to complete the integration:

  1. basic-integration-1.0-begin.md - PostHog Setup - Begin ← Start here
  2. basic-integration-1.1-edit.md - PostHog Setup - Edit
  3. basic-integration-1.2-revise.md - PostHog Setup - Revise
  4. basic-integration-1.3-conclude.md - PostHog Setup - Conclusion

Reference files

  • references/EXAMPLE.md - Expo example project code
  • references/react-native.md - React native - docs
  • references/identify-users.md - Identify users - docs
  • references/basic-integration-1.0-begin.md - PostHog setup - begin
  • references/basic-integration-1.1-edit.md - PostHog setup - edit
  • references/basic-integration-1.2-revise.md - PostHog setup - revise
  • references/basic-integration-1.3-conclude.md - PostHog setup - conclusion

The example project shows the target implementation pattern. Consult the documentation for API details.

Key principles

  • Environment variables: Always use environment variables for PostHog keys. Never hardcode them.
  • Minimal changes: Add PostHog code alongside existing integrations. Don't replace or restructure existing code.
  • Match the example: Your implementation should follow the example project's patterns as closely as possible.

Framework guidelines

  • posthog-react-native is the React Native SDK package name (same as bare RN)
  • Use expo-constants with app.config.js extras for POSTHOG_PROJECT_TOKEN and POSTHOG_HOST (NOT react-native-config)
  • Access config via Constants.expoConfig?.extra?.posthogProjectToken in your posthog.ts config file
  • For expo-router, wrap PostHogProvider in app/_layout.tsx and manually track screens with posthog.screen(pathname, params) in a useEffect
  • posthog-react-native is the React Native SDK package name
  • Use react-native-config to load POSTHOG_PROJECT_TOKEN and POSTHOG_HOST from .env (variables are embedded at build time, not runtime)
  • react-native-svg is a required peer dependency of posthog-react-native (used by the surveys feature) and must be installed alongside it
  • Place PostHogProvider INSIDE NavigationContainer for React Navigation v7 compatibility

Identifying users

Identify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers to maintain correlation.

Error tracking

Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

convex

免费

Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

查看 Melvynx 的全部技能

报告此技能的问题