Conversation
Collaborator
Generated by 🚫 Danger |
MiSikora
commented
Jun 28, 2024
Comment on lines
-124
to
-126
| private fun setupAnalytics() { | ||
| AnalyticsTracker.init(settings) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I noticed that Automotive app unlike Phone and Wear apps does not refresh trackers metadata here. I'm not sure if it is a bug but I kept previous behavior.
geekygecko
approved these changes
Jun 28, 2024
| AnalyticsTracker.register(tracksTracker, bumpStatsTracker) | ||
| AnalyticsTracker.init(settings) | ||
| AnalyticsTracker.refreshMetadata() | ||
| analyticsTracker.clearAllData() |
Member
There was a problem hiding this comment.
I see the old logic also cleared the data. Do you know why we do that? I was wondering if that would clear events that should be sent.
Contributor
Author
There was a problem hiding this comment.
Maybe? I don't know. I think it would be better to leave it for another PR to know what should be done here.
...s/services/analytics/src/main/java/au/com/shiftyjelly/pocketcasts/analytics/TrackerModule.kt
Outdated
Show resolved
Hide resolved
...ervices/analytics/src/main/java/au/com/shiftyjelly/pocketcasts/analytics/AnalyticsTracker.kt
Outdated
Show resolved
Hide resolved
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.
Description
I'm doing this work to make my work with clip analytics easier.
We had a strange configuration of
object AnalyticsTrackerandclass AnalyticsTrackerWrapper. The first one was used to register all trackers and the latter one was used for DI but it was a bit clunky to use because it calledobject AnalyticsTrackerinside.This PR removes
object AnalyticsTrackerand uses proper DI forclass AnalyticsTracker. Previously DI was impossible because there was a cyclic dependency, which I had to break in this PR by introducingAccountManagerStatusInfo. The PR also decouples it fromSettingsmaking testing a bit easier without a need for mocks.You can ignore 6605bba as it is just a renaming PR. The meat of the PR is in f399dc9.
Testing Instructions
"user_is_logged_in":falseproperty."user_is_logged_in":trueproperty. Signing out at this point will fail to reflect the property change (User logged in status is cached #2409)._ui) is still correctly tracked. However user type will be incorrect due to this bug - Fix all Simplenote users and Pocket Cast users being set to Day One users Automattic-Tracks-Android#223.Analytics.Checklist
If this is a user-facing change, I have added an entry in CHANGELOG.md./gradlew spotlessApplyto automatically apply formatting/linting)All strings that need to be localized are inmodules/services/localization/src/main/res/values/strings.xmlAny jetpack compose components I added or changed are covered by compose previewsI have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.I have tested any UI changes...
with different themeswith a landscape orientationwith the device set to have a large display and font sizefor accessibility with TalkBack