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

# PostHog (EU)

> Query analytics, events, and feature flags on PostHog EU cloud — track product metrics and run experiments from Mantle with EU data residency

Connect your PostHog EU cloud account and let your AI agents query analytics events, manage feature flags, run
experiments, and build dashboards — all from Mantle. This integration connects to PostHog's EU data region
(eu.posthog.com), keeping your data within the European Union.

***

## What you unlock

<CardGroup cols={2}>
  <Card title="Event analytics" icon="chart-mixed">
    Query events, track user behavior, and analyze funnels and trends through natural language.
  </Card>

  <Card title="Feature flags" icon="flag">
    Create, update, and evaluate feature flags — control rollouts and target specific user segments.
  </Card>

  <Card title="Experiments" icon="flask">
    Set up and monitor A/B experiments, track results, and make data-driven decisions.
  </Card>

  <Card title="Dashboards & insights" icon="chart-pie">
    Create dashboards, build custom insights, and analyze retention and funnel data.
  </Card>
</CardGroup>

***

## Connect PostHog (EU)

<Steps>
  <Step title="Open Settings → Integrations">
    In any workspace go to **Settings → Integrations** and select **PostHog (EU)**.
  </Step>

  <Step title="Get your API key">
    Log in to your PostHog EU account at [eu.posthog.com](https://eu.posthog.com), navigate to **Settings → Personal API
    Keys**, and create a new key with the scopes your agent needs.
  </Step>

  <Step title="Paste and connect">Paste the key into the **API Key** field and click **Connect**.</Step>
</Steps>

<Note>
  This integration connects to PostHog's **EU data region**. If your PostHog project is hosted in the US, use the
  **PostHog (US)** integration instead. The EU region ensures your analytics data stays within the European Union.
</Note>

***

## Agent tools

Add PostHog tools to agents that need them. Their access is limited by the connected key and selected tools.

### Events & Analytics

| Tool                 | Description                              |
| -------------------- | ---------------------------------------- |
| Capture event        | Send a custom event to PostHog           |
| List events          | List and filter events in a project      |
| Get event definition | Retrieve details of an event definition  |
| Create insight       | Create a custom analytics insight        |
| Get trend insights   | Retrieve trend data for events over time |
| Get funnel insights  | Analyze conversion funnels               |

### Feature Flags

| Tool                | Description                                         |
| ------------------- | --------------------------------------------------- |
| Create feature flag | Create a new feature flag with targeting rules      |
| Get flag details    | Retrieve feature flag configuration and status      |
| Update feature flag | Modify flag rules, rollout percentage, or targeting |
| List feature flags  | List all feature flags in a project                 |
| Get flag status     | Check the evaluation status of a feature flag       |

### Experiments & Dashboards

| Tool                 | Description                                      |
| -------------------- | ------------------------------------------------ |
| Create experiment    | Set up a new A/B experiment                      |
| Get experiment stats | Retrieve experiment results and statistical data |
| List dashboards      | List all dashboards in a project                 |
| Create dashboard     | Create a new dashboard                           |
| Get cohort details   | Retrieve details of a user cohort                |

***

## Triggers

<Note>
  Automated triggers for PostHog are not yet available. Triggers will be added in a future update — check back soon.
</Note>

***

## Example use cases

<AccordionGroup>
  <Accordion title="Quick metrics check from chat">
    Ask "How many users completed onboarding this week?" and the agent queries PostHog events, filters by date, and
    returns the count — no dashboard navigation needed.
  </Accordion>

  <Accordion title="Feature flag rollout management">
    Ask your agent to roll out a feature flag to 25% of users in a specific cohort. It updates the flag configuration
    and confirms the targeting rules are applied.
  </Accordion>

  <Accordion title="GDPR-compliant experiment analysis">
    Run experiments and analyze results knowing your data stays in the EU. Ask "How is the pricing page experiment
    performing?" and get a clear statistical summary.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="My API key isn't working">
    Verify the key was created at [eu.posthog.com](https://eu.posthog.com) under **Settings → Personal API Keys**. Make
    sure the key has the scopes needed for the operations your agent performs. US keys will not work with this
    integration.
  </Accordion>

  <Accordion title="Wrong data region">
    This integration connects to PostHog's EU cloud (eu.posthog.com). If your project is on the US cloud, disconnect
    this integration and connect **PostHog (US)** instead.
  </Accordion>

  <Accordion title="Events aren't showing up">
    Events may take a few minutes to appear in PostHog after being captured. If events are consistently missing, check
    that your PostHog SDK is correctly initialized and pointing to the EU endpoint.
  </Accordion>

  <Accordion title="Feature flag evaluation returns unexpected results">
    Check the flag's targeting rules and rollout percentage. Use "Get flag details" to inspect the full configuration
    and verify the conditions match your expectations.
  </Accordion>
</AccordionGroup>

***

<Card title="Back to Integrations" icon="plug" href="/integrations/overview">
  View all available integrations
</Card>
