Repository navigation
Conversation
The data analyst's snippet, as given, in index.html (G-44RHV2ZWQ1). E2E tests block requests to Google so they stay offline and send no hits to the property. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
📊 Code Quality Score: 4/100
Was this score accurate? 👍 Yes · 👎 No Scored by GitVelocity · How are scores calculated? |
There was a problem hiding this comment.
🟡 Changes recommended
The GA4 integration bypasses analytics opt-outs and privacy signals, exposes search queries through automatic page views, and creates cookies contrary to the documented privacy promise.
4 open issues
What changed in this PR
Adds Google Analytics 4 visitor tracking alongside the app’s existing analytics integration, with request blocking in end-to-end tests.
Changes:
- Loads
gtag.jsand initializes the GA4 property in the HTML entry point. - Blocks Google tag and analytics requests in the shared test fixture to prevent test traffic from reaching the property.
| File | Description |
|---|---|
index.html |
Adds the GA4 script and initialization. |
e2e/support.ts |
Blocks GA4 network requests during end-to-end tests. |
Review effort: Balanced
| /> | ||
| <meta name="twitter:image" content="https://powered-by.sefaria.org/og-image.png" /> | ||
| <!-- Google tag (gtag.js) --> | ||
| <script async src="https://www.googletagmanager.com/gtag/js?id=G-44RHV2ZWQ1"></script> |
| } | ||
| gtag('js', new Date()) | ||
|
|
||
| gtag('config', 'G-44RHV2ZWQ1') |
| } | ||
| gtag('js', new Date()) | ||
|
|
||
| gtag('config', 'G-44RHV2ZWQ1') |
| } | ||
| gtag('js', new Date()) | ||
|
|
||
| gtag('config', 'G-44RHV2ZWQ1') |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Integrating analytics