integration-react-native

Instructions and guidance for integrating PostHog into React Native applications.

Installation

Review the source and dependencies with a prompt.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "integration-react-native" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-977601c300eddf4c4d6049dec027ad1aa615cde7504b9fb8f2a299edc8dd135d. Verify the upstream source and version against https://skills.sh/posthog/skills/integration-react-native before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Download permission for this version is unverified or restricted.

Source and setup

skills.sh

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Instructions and guidance for integrating PostHog into React Native applications.

0 Downloads

Introduction source: third_party · posthog · 1.0.0 Reference

SkillPi interpretation

Tasks
PostHog integration for React Native applications
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

A verified file list is not available on Skillπ yet.

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: integration-react-native
description: PostHog integration for React Native applications
metadata:
  author: PostHog
  version: 1.9.4

PostHog integration for React Native

This skill helps you add PostHog analytics to React Native 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 - React Native 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
  • 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.

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供 React Native 应用集成 PostHog 分析工具的具体指导
  • 属于明确场景的通用工具,具有广泛受众的实用能力
Trigger Precision95/100

Highlights

  • description 明确为 'React Native 应用的 PostHog 集成',触发词精准完整,边界清晰
Structure and Standards90/100

Highlights

  • Phase/步骤清晰(Workflow 列出 4 个步骤),有出口条件
  • 含端到端示例(Reference files 提供完整参考),frontmatter 完整
Execution Reliability85/100

Highlights

  • 工具来源明确(posthog-react-native SDK),参数正确(环境变量、依赖项)
  • 覆盖主要异常(错误跟踪),不可逆操作有确认机制(遵循示例模式)
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

risk · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.