refactor(analytics): reduce tracking footprint#4649
Merged
jamesarich merged 3 commits intomainfrom Feb 26, 2026
Merged
Conversation
… is granted
This commit refactors the analytics implementation to enhance user privacy by delaying the initialization of the Firebase and Datadog SDKs until explicit user consent is granted. Previously, these services were initialized on application startup.
Key changes include:
- SDK initialization is now triggered by the `updateAnalyticsConsent` method when analytics are allowed.
- Datadog and Firebase log writers are now inner classes and will not log any data until the SDKs are initialized.
- The default state for analytics is now set to `denied` (`false`).
- Additional privacy-focused configurations have been implemented:
- Firebase Advanced Consent Mode is used to explicitly deny all ad-related data collection.
- Automatic screen reporting, SSAID collection, and ad personalization signals are disabled in `AndroidManifest.xml`.
- Noisy or PII-sensitive Datadog features like frustration tracking, background events, and user interaction tracking have been disabled.
Signed-off-by: James Rich <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4649 +/- ##
==========================================
- Coverage 17.37% 15.34% -2.04%
==========================================
Files 83 83
Lines 4350 4347 -3
Branches 743 742 -1
==========================================
- Hits 756 667 -89
- Misses 3451 3556 +105
+ Partials 143 124 -19 ☔ View full report in Codecov by Sentry. |
Signed-off-by: James Rich <[email protected]>
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.
Reduces analytics tracking footprint.
This refactors the analytics implementation to enhance user privacy by delaying the initialization of the Firebase and Datadog SDKs until explicit user consent is granted. Previously, these services were initialized on application startup.
Key changes include:
updateAnalyticsConsentmethod when analytics are allowed.denied(false).AndroidManifest.xml.