Skip to content

refactor(analytics): reduce tracking footprint#4649

Merged
jamesarich merged 3 commits intomainfrom
fix/tracking
Feb 26, 2026
Merged

refactor(analytics): reduce tracking footprint#4649
jamesarich merged 3 commits intomainfrom
fix/tracking

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

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:

  • 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.

… 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]>
@github-actions github-actions bot added the bugfix PR tag label Feb 25, 2026
@jamesarich jamesarich enabled auto-merge February 25, 2026 19:59
@jamesarich jamesarich added this pull request to the merge queue Feb 25, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.34%. Comparing base (9970d31) to head (3a501a7).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 25, 2026
@jamesarich jamesarich added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 85c6ed6 Feb 26, 2026
7 checks passed
@jamesarich jamesarich deleted the fix/tracking branch February 26, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant