-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): Send configuration for ga4 and gtm (#5535)
* feat: Send configuration for ga4 and gtm * Update parseDocsConfiguration * Bump version
- Loading branch information
Showing
14 changed files
with
166 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,34 @@ subtitle: Add Google Analytics to your Docs with Fern. | |
|
||
Fern supports integrating with both [Google Analytics 4](https://developers.google.com/analytics) and [Google Tag Manager](https://tagmanager.google.com/). | ||
|
||
<Tip> | ||
This feature is available on the Fern Basic plan and above. Reach out to [[email protected]](mailto:[email protected]) to set up your Google Analytics. | ||
</Tip> | ||
## 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." | ||
|
||
### Integrate Google Analytics 4 with your Docs | ||
|
||
In your `docs.yml` file, add your Google Analytics 4 property ID under the `measurement-id` key: | ||
|
||
<CodeBlock title="docs.yml"> | ||
```yaml | ||
analytics: | ||
ga4: | ||
measurement-id: ${GA4_MEASUREMENT_ID} # scans 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." | ||
### Integrate Google Tag Manager with your Docs | ||
In your `docs.yml` file, add your Google Tag Manager container ID: | ||
|
||
<CodeBlock title="docs.yml"> | ||
```yaml | ||
analytics: | ||
gtm: | ||
container-id: ${GTM_CONTAINER_ID} # scans environment variable | ||
``` | ||
</CodeBlock> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/GoogleAnalytics4Config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface GoogleAnalytics4Config { | ||
measurementId: string; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/cli/configuration/src/docs-yml/schemas/sdk/api/resources/docs/types/GtmConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface GtmConfig { | ||
containerId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ion/src/docs-yml/schemas/sdk/serialization/resources/docs/types/GoogleAnalytics4Config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as serializers from "../../../index"; | ||
import * as FernDocsConfig from "../../../../api/index"; | ||
import * as core from "../../../../core"; | ||
|
||
export const GoogleAnalytics4Config: core.serialization.ObjectSchema< | ||
serializers.GoogleAnalytics4Config.Raw, | ||
FernDocsConfig.GoogleAnalytics4Config | ||
> = core.serialization.object({ | ||
measurementId: core.serialization.property("measurement-id", core.serialization.string()), | ||
}); | ||
|
||
export declare namespace GoogleAnalytics4Config { | ||
export interface Raw { | ||
"measurement-id": string; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...li/configuration/src/docs-yml/schemas/sdk/serialization/resources/docs/types/GtmConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as serializers from "../../../index"; | ||
import * as FernDocsConfig from "../../../../api/index"; | ||
import * as core from "../../../../core"; | ||
|
||
export const GtmConfig: core.serialization.ObjectSchema<serializers.GtmConfig.Raw, FernDocsConfig.GtmConfig> = | ||
core.serialization.object({ | ||
containerId: core.serialization.property("container-id", core.serialization.string()), | ||
}); | ||
|
||
export declare namespace GtmConfig { | ||
export interface Raw { | ||
"container-id": string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters