Repository navigation
feat(analytics): internal traffic, debug mode and user properties - #62
Merged
Merged
Conversation
- /?internal=1 tags the browser as internal traffic (traffic_type) so the GA Internal Traffic filter can exclude the owner's visits; /?internal=0 clears it. Stored in localStorage and works on any network - /?ga_debug=1 sends the tab's visit to DebugView (debug_mode); kept in sessionStorage so it ends with the tab. debug_mode is omitted entirely when off, since GA treats any value as on - both switches are read on load even before consent and removed from the address bar so shared links never carry them - site_language and color_scheme user properties, set before config and updated when the theme or the system scheme changes - privacy policy (EN/PT) lists the two new data points; README documents the switches - analytics spec covers properties, flags, persistence and URL cleanup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: c13ebd3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
/?internal=1once tags that browser, and its hits carrytraffic_type=internal, so GA's Internal Traffic filter can exclude your own visits on any network./?internal=0undoes it./?ga_debug=1addsdebug_modefor that tab only (sessionStorage). The key is left out entirely when off, because GA treats anydebug_modevalue as on.site_language(en/pt-BR) andcolor_scheme(light/dark), updated when the theme or the system scheme changes.Verification
gtag.jswith hits blocked before sending, showed:en=page_view up.site_language=en up.color_scheme=light, no internal or debug markers;/pt?internal=1in dark mode:tt=internal up.site_language=pt-BR up.color_scheme=dark;/?ga_debug=1:ep.debug_mode=true.After merging (in GA)
site_languageandcolor_schemeas User-scoped custom dimensions.https://rafer.dev/?internal=1from each of your browsers, then activate the Internal Traffic data filter.🤖 Generated with Claude Code