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

Remove global Google Analytics and simplify privacy package. #824

Merged
merged 5 commits into from Oct 26, 2023

Conversation

pablo-mayrgundter
Copy link
Member

@pablo-mayrgundter pablo-mayrgundter commented Oct 25, 2023

  • Don't even initialize GA when analytics user-pref is disabled.
  • Changed gtags to react-ga4 npm. Update to use our GA4 ID.
  • Simplify privacy package: use js-cookie npm and use simple wrappers for cookies we use: isAnalyticsEnabled, isFirstTime and theme preferences.

Tested locally by disabling msw and watching traffic in GA4 dashboard. Not showing up in netlify, but I do see netlify as a suggested domain in GA4 dashboard, so perhaps GA is just not turning itself on unless it's in a configured domain.

I suggest pushing this live and I verify it's live there.

@netlify
Copy link

netlify bot commented Oct 25, 2023

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit 0aadced
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/653993487b3c590008e2025b
😎 Deploy Preview https://deploy-preview-824--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 25 (🔴 down 2 from production)
Accessibility: 84 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 25, 2023

Deploy Preview for bldrs-share-v2 ready!

Name Link
🔨 Latest commit 0aadced
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share-v2/deploys/65399348aa574f000805b5fd
😎 Deploy Preview https://deploy-preview-824--bldrs-share-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/__mocks__/api-handlers.js Show resolved Hide resolved
src/privacy/analytics.js Outdated Show resolved Hide resolved
@pablo-mayrgundter
Copy link
Member Author

PTAL

@pablo-mayrgundter
Copy link
Member Author

@OlegMoshkovich fyi too. I apologize to both of you for the ugly cookie/privacy system before! 😬

@pablo-mayrgundter pablo-mayrgundter changed the title Remove global Google Analytics and mock in dev mode. Remove global Google Analytics and simplify privacy package. Oct 25, 2023
@pablo-mayrgundter pablo-mayrgundter merged commit 6b0f760 into bldrs-ai:main Oct 26, 2023
13 checks passed
@pablo-mayrgundter pablo-mayrgundter deleted the google-analytics branch October 26, 2023 15:37
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.

None yet

2 participants