From 38a6d80a518d6ef1fc607a37c2aff1323f5ea06f Mon Sep 17 00:00:00 2001 From: sagar-vapi <161429577+sagar-vapi@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:27:04 +0530 Subject: [PATCH] Adding posthog integration for analytics (#141) --- .github/workflows/preview-docs.yml | 1 + .github/workflows/publish-docs.yml | 1 + fern/docs.yml | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 4b9c83b..ce6eadf 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -17,6 +17,7 @@ jobs: id: generate-docs env: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }} run: | OUTPUT=$(fern generate --docs --preview --log-level debug 2>&1) || true echo "$OUTPUT" diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index fee02a1..2173532 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -19,4 +19,5 @@ jobs: - name: Publish Docs env: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }} run: fern generate --docs --log-level debug \ No newline at end of file diff --git a/fern/docs.yml b/fern/docs.yml index 89ba72e..eb4cfc2 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -81,6 +81,10 @@ layout: tabs-placement: header searchbar-placement: header header-height: 80px +analytics: + posthog: + api-key: ${POSTHOG_PROJECT_API_KEY} + endpoint: https://us.i.posthog.com navigation: - tab: documentation layout: