Integrations

Analytics

Support and Feature Flags

Enabling Analytics

Most analytics integrations can be configured directly in docs.yml. You only need to include entries for the platforms you want to connect.

docs.yml
1analytics:
2 ga4:
3 measurement-id: ${GA4_MEASUREMENT_ID}
4 posthog:
5 api-key: ${POSTHOG_API_KEY}
6 endpoint: https://self.hosted.posthog.com/
7 segment:
8 write-key: ${SEGMENT_WRITE_KEY}
9 intercom:
10 app-id: ${INTERCOM_APP_ID}
11 endpoint: https://intercom.custom-instance.com/
12 fullstory:
13 org-id: ${FULLSTORY_ORG_ID}

Environment Variables

If your docs configuration is public, then we do not advise adding secret values directly to docs.yml. Instead, you can 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.

1- name: Publish Docs
2 env:
3 FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
4 GA4_MEASUREMENT_ID: ${{ secrets.GA4_MEASUREMENT_ID }}
5 POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
6 run: |
7 npm install -g fern-api
8 fern generate --docs

Postman

The Postman integration is not configured in docs.yml and is instead configured in generators.yml. Check out this page to learn more.