Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add google analytics #182

Merged
merged 3 commits into from
Nov 4, 2024
Merged

add google analytics #182

merged 3 commits into from
Nov 4, 2024

Conversation

ptbarnum4
Copy link
Contributor

@ptbarnum4 ptbarnum4 commented Nov 1, 2024

I'm not 100% sure if this will work as expected. I think that will become clear pretty quickly once deployed to check if we are seeing the information we want

Screenshot 2024-11-04 at 2 47 21 PM

Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opspark-website-2022 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 4:05pm

Comment on lines 8 to 22
<Script
id='google-analytics-script'
strategy='afterInteractive'
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.GOOGLE_ANALYTICS_ID}`}
/>

<Script
id='google-analytics-init'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '${process.env.GOOGLE_ANALYTICS_ID}');
Copy link
Contributor

@harveysanders harveysanders Nov 4, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@ptbarnum4 ptbarnum4 Nov 4, 2024

Choose a reason for hiding this comment

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

moved all client environment variables to clientConfig f416b0b

@ptbarnum4 ptbarnum4 merged commit 0feb285 into main Nov 4, 2024
4 checks passed
@ptbarnum4 ptbarnum4 deleted the add-google-analytics branch November 4, 2024 16:21
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.

Add Google Analytics to operationspark.org
2 participants