# Analytics and integrations

> Connect analytics and support tools to your Fern documentation. Set up PostHog, Segment, FullStory, Intercom, and Postman collections.

<CardGroup cols={2}>
  <Card title="PostHog" href="/docs/integrations/analytics/posthog" horizontal icon={<img src="https://cdn.brandfetch.io/id2veLU_gI/idG9S94wXO.svg" />} iconSize={12} />

  <Card
    title="Segment"
    href="/docs/integrations/analytics/segment"
    horizontal
    icon={
    <img src="https://cdn.brandfetch.io/idiousYjQz/theme/dark/symbol.svg?k=id64Mup7ac&t=1717151164256?t=1717151164256" />
  }
    iconSize={12}
  />

  <Card title="FullStory" href="/docs/integrations/analytics/fullstory" horizontal icon={<img src="https://cdn.brandfetch.io/idRtIBDum6/w/400/h/400/theme/dark/icon.jpeg" />} iconSize={12} />

  <Card title="Intercom" href="/docs/integrations/support/intercom" horizontal icon={<img src="https://cdn.brandfetch.io/idYJNDWF1m/theme/dark/symbol.svg" />} iconSize={12} />

  <Card title="Postman" href="/docs/integrations/postman" horizontal icon={<img src="https://www.svgrepo.com/show/354202/postman-icon.svg" />} iconSize={12} />
</CardGroup>

## Enable analytics

You can define your analytics configuration in `docs.yml`. You only need to include entries for the platforms you want to connect.

```yaml docs.yml
analytics:
  posthog:
    api-key: ${POSTHOG_API_KEY}
    endpoint: https://self.hosted.posthog.com/
  segment:
    write-key: ${SEGMENT_WRITE_KEY}
  intercom:
    app-id: ${INTERCOM_APP_ID}
    endpoint: https://intercom.custom-instance.com/
  fullstory:
    org-id: ${FULLSTORY_ORG_ID}
```

### Environment variables

If your docs configuration is public, don't add secret values directly to `docs.yml`.
Instead, reference an environment variable by using the syntax `${VARIABLE_NAME}`.

<Note>
  If you are using GitHub Workflows to trigger docs generation, you must make sure that the environment variables
  are available during the workflow run.

  ```yaml {4}
  - name: Publish Docs
    env:
      FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
      POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
    run: |
      npm install -g fern-api
      fern generate --docs
  ```
</Note>

## Configure Postman collections

Fern can generate Postman collections from your API definitions with example requests and responses. [Configure Postman](/learn/docs/integrations/postman) in [`generators.yml`](/sdks/overview/project-structure#generatorsyml).

## Connect other integrations

<Warning title="Enterprise feature">
  This feature is available only for the [Enterprise plan](https://buildwithfern.com/pricing). To get started, reach out to [support@buildwithfern.com](mailto:support@buildwithfern.com).
</Warning>

If you want to integrate with a third-party analytics or support platforms that Fern doesn't directly support, you can do so [using custom JS](/docs/customization/custom-css-js#custom-javascript).