> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leap.new/llms.txt
> Use this file to discover all available pages before exploring further.

# PostHog Integration

> Comprehensive analytics with event tracking, feature flags, conversion funnels, and user insights

Leap makes it easy to add comprehensive analytics using [PostHog](https://posthog.com). Just describe your tracking needs, and Leap generates the integration with event tracking, feature flags, and user analytics.

## How it works

1. **Describe your analytics needs** in a prompt
2. **Leap generates the integration** with PostHog's API
3. **Add your project API key** to secrets when prompted

<Info>
  **LLM results vary**, but we've had success getting PostHog integrations working in one shot with proper event tracking.
</Info>

## Example prompt

```
Add PostHog analytics to track user signups,
feature usage, and conversion funnels with A/B testing for new features
and session recording for debugging user issues
```
