Repository navigation
feat: implement analytics tracking plan - #28
Merged
Merged
Conversation
Implement the tracking plan in backlog doc-2 (SEVAND-12): 24 new events, 13 changed events and 8 Amplitude/Firebase user properties. - Track screen views from SevNavigator transitions in a process-level ScreenViewTracker, with a trigger (launch, navigation, back) and the Stop Details source. App Started fires once per process - Skip Line Stops Viewed on route switches and track Route Direction Switched instead - Add SessionTracker to send Session Summary on background, with sessionType, lastScreen and the usageProfile/isCommuter user properties - Add UserPropertiesTracker and Tracker.setUserProperty (Amplitude identify, Firebase user properties) - Track Arrivals Displayed once per screen view and Arrivals Failed on every failed request, plus Stop Details Closed - Add login, search, map, bottom sheet, location permission, edit favorites, cards, night mode and NFC events - Keep the Amplitude Device ID on logout, rename the line, type and duration properties, and track Card Check Completed outcomes - Send booleans and lists correctly to Firebase and skip null properties
Contributor
✅ Screenshot tests passedAll screenshots match their references. Workflow run |
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.
Implements SEVAND-12 (Implement analytics tracking plan): the tracking plan in
backlog/docs/doc-2 - Analytics-tracking-plan.md.Changes
ScreenViewTrackerfromSevNavigator.transitions, so recreating the activity no longer tracks them again. Every screen view sendstrigger(launch, navigation, back).Stop Details ViewedsendssourceandhighlightedLineId.Route Direction Switcheddoes.SessionTracker, withsessionType,lastScreenand theusageProfile/isCommuteruser properties from a 30-day local history.Tracker.setUserProperty: Amplitudeidentify, Firebase user properties.Arrivals Displayedonce per screen view (stop detail, favorites, nearby),Arrivals Failedon every failed request,Stop Details Closed.lineLabel,cardType,durationSeconds), Card Check Completed outcomes.Decisions where the plan left room for interpretation are listed in doc-2, "Implementation notes".
Testing
./gradlew test: 144 tests pass. New tests cover screen view sources and triggers, Line Stops on route switch, Arrivals Displayed per view, Stop Details Closed, session classification andlastScreen, Edit Favorites diff, Card Check Completed and the renamed properties../gradlew validateDebugScreenshotTest: 85 pass.lastScreenvalues (for_you,stop_detail, ...) still need to be confirmed against the Amplitude tracking plan.