Skip to content

add ga4 gtag - #352

Merged
Ethan-Arrowood merged 2 commits into
mainfrom
add-gtag
Oct 22, 2025
Merged

Ethan-Arrowood merged 2 commits into
mainfrom
add-gtag

Conversation

@Ethan-Arrowood

Copy link
Copy Markdown
Member

No description provided.

@Ethan-Arrowood

Copy link
Copy Markdown
Member Author

I added the secret; not sure why CI failed first run. Checking again before merging to be certain.

Comment thread docusaurus.config.ts Outdated
Comment on lines +247 to +254
// GA4
[
'@docusaurus/plugin-google-gtag',
{
trackingID: process.env.GA4_TRACKING_ID || '',
anonymizeIP: true,
},
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// GA4
[
'@docusaurus/plugin-google-gtag',
{
trackingID: process.env.GA4_TRACKING_ID || '',
anonymizeIP: true,
},
],
// GA4 - only load if tracking ID is set
...(process.env.GA4_TRACKING_ID
? [
[
'@docusaurus/plugin-google-gtag',
{
trackingID: process.env.GA4_TRACKING_ID,
anonymizeIP: true,
},
],
]
: []),

This errors when trying to build locally too. Maybe just include if we have the env var?

@heskew

heskew commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

I added the secret; not sure why CI failed first run. Checking again before merging to be certain.

Might need to add it to the build step? https://github.com/HarperFast/documentation/blob/main/.github/workflows/deploy.yaml#L52

@Ethan-Arrowood

Copy link
Copy Markdown
Member Author

Ah that is definitely what is missing; thought I pushed that commit. Whoops

@Ethan-Arrowood
Ethan-Arrowood requested a review from heskew October 21, 2025 17:25
@Ethan-Arrowood
Ethan-Arrowood merged commit 990c3f3 into main Oct 22, 2025
5 checks passed
@Ethan-Arrowood
Ethan-Arrowood deleted the add-gtag branch October 22, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants