*** title: Analytics and integrations description: >- Connect analytics and support tools to your Fern documentation. Set up PostHog, Segment, FullStory, Intercom, and Postman collections. --------------------------------------------------------------- For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see [https://buildwithfern.com/learn/llms.txt](https://buildwithfern.com/learn/llms.txt). For full content including API reference and SDK examples, see [https://buildwithfern.com/learn/llms-full.txt](https://buildwithfern.com/learn/llms-full.txt). } iconSize={12} /> } iconSize={12} /> } iconSize={12} /> } iconSize={12} /> } iconSize={12} /> ## 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}`. 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 ``` ## Connect other integrations 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). 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).