Skip to content

Commit

Permalink
chore(docs): Update documentation for ga and gtm to make it more frie…
Browse files Browse the repository at this point in the history
…ndly (#5547)

Update documentation for ga and gtm to make it more friendly
  • Loading branch information
rpc333 authored Jan 7, 2025
1 parent d7d370a commit 0d62322
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ layout:

js:
- ./js/koala.js

analytics:
posthog:
api-key: ${POSTHOG_API_KEY}
Expand Down
28 changes: 24 additions & 4 deletions fern/pages/docs/integrations/analytics/google.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Fern supports integrating with both [Google Analytics 4](https://developers.goog

## Google Analytics 4

To integrate Google Analytics 4, you'll need a Google Analytics 4 property ID. It should look like: “UA-XXXXXX-X” or "G-XXXXXXX."
To integrate Google Analytics 4, you'll need a Google Analytics 4 property ID. It usually looks like “UA-XXXXXX-X” or "G-XXXXXXX."

### Integrate Google Analytics 4 with your Docs

Expand All @@ -17,13 +17,23 @@ In your `docs.yml` file, add your Google Analytics 4 property ID under the `meas
```yaml
analytics:
ga4:
measurement-id: ${GA4_MEASUREMENT_ID} # scans environment variable
measurement-id: G-12345678
```
</CodeBlock>
You can also add the ID as an environment variable:
<CodeBlock title="docs.yml">
```yaml
analytics:
ga4:
measurement-id: ${GA4_MEASUREMENT_ID} # scans for GA4_MEASUREMENT_ID environment variable
```
</CodeBlock>
## Google Tag Manager
To integrate Google Tag Manager, you'll need a Google Tag Manager container ID. It should look like: "GTM-XXXXXX."
To integrate Google Tag Manager, you'll need a Google Tag Manager container ID. It usually looks like: "GTM-XXXXXX."
### Integrate Google Tag Manager with your Docs
Expand All @@ -33,6 +43,16 @@ In your `docs.yml` file, add your Google Tag Manager container ID:
```yaml
analytics:
gtm:
container-id: ${GTM_CONTAINER_ID} # scans environment variable
container-id: GTM-NS32L7KR
```
</CodeBlock>

You can also add the ID as an environment variable:

<CodeBlock title="docs.yml">
```yaml
analytics:
gtm:
container-id: ${GTM_CONTAINER_ID} # scans for GTM_CONTAINER_ID environment variable
```
</CodeBlock>

0 comments on commit 0d62322

Please sign in to comment.