-
-
Notifications
You must be signed in to change notification settings - Fork 738
YiR: wire up instrumentation #6062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cooltey
wants to merge
22
commits into
main
Choose a base branch
from
yir-instrumentation-wire
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
15b2ab2
YiR: wire up instrumentation
cooltey 2403aa7
Merge branch 'main' into yir-instrumentation-wire
cooltey b2a1599
Add events for slides
cooltey 952511a
Merge branch 'main' into yir-instrumentation-wire
cooltey 5d931d1
Merge branch 'main' into yir-instrumentation-wire
cooltey 758abb9
Merge branch 'main' into yir-instrumentation-wire
cooltey 96d25fb
Put slide names to screen data functions
cooltey faaa508
Merge branch 'main' into yir-instrumentation-wire
cooltey 983a337
Fix
cooltey 248710c
Wire up click actions
cooltey e8e3a3b
Only send impression for the current slide
cooltey b6c2531
Fix lint
cooltey 82a2f03
Merge branch 'main' into yir-instrumentation-wire
cooltey b859418
Update after discussion
cooltey eb9d96a
Wire up survey
cooltey 4cb9ecd
highlight share
cooltey 1b71bae
Merge branch 'main' into yir-instrumentation-wire
cooltey b0a236c
Merge branch 'main' into yir-instrumentation-wire
Williamrai 2da41d1
Merge branch 'main' into yir-instrumentation-wire
cooltey 2c6ca8a
Code review comment
cooltey 572745d
Avoid sending multiple events
cooltey e504fe3
Finalized instrumentation
cooltey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
51 changes: 51 additions & 0 deletions
51
app/src/main/java/org/wikipedia/analytics/eventplatform/YearInReviewEvent.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package org.wikipedia.analytics.eventplatform | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
| import org.wikipedia.WikipediaApp | ||
| import org.wikipedia.dataclient.donate.CampaignCollection | ||
| import org.wikipedia.json.JsonUtil | ||
|
|
||
| open class YearInReviewEvent { | ||
|
|
||
| companion object { | ||
| fun submit( | ||
| action: String, | ||
| activeInterface: String = "wiki_yir", | ||
| groupAssigned: String? = null, | ||
| campaignId: String? = null, | ||
| slide: String? = null, | ||
| feedbackSelect: Int? = null, | ||
| feedbackText: String? = null, | ||
| wikiId: String = WikipediaApp.instance.appOrSystemLanguageCode | ||
| ) { | ||
| EventPlatformClient.submit( | ||
| AppInteractionEvent( | ||
| action = action, | ||
| active_interface = activeInterface, | ||
| action_data = JsonUtil.encodeToString(ActionData( | ||
| campaignId = campaignId?.let { | ||
| CampaignCollection.getFormattedCampaignId(it) | ||
| }, | ||
| groupAssigned = groupAssigned, | ||
| slide = slide, | ||
| feedbackSelect = feedbackSelect, | ||
| feedbackText = feedbackText | ||
| )).orEmpty(), | ||
| primary_language = WikipediaApp.instance.languageState.appLanguageCode, | ||
| wiki_id = wikiId, | ||
| streamName = "app_donor_experience" | ||
| ) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Serializable | ||
| class ActionData( | ||
| val slide: String? = null, | ||
| @SerialName("campaign_id") val campaignId: String? = null, | ||
| @SerialName("group_assigned") val groupAssigned: String? = null, | ||
| @SerialName("feedback_select") val feedbackSelect: Int? = null, | ||
| @SerialName("feedback_text") val feedbackText: String? = null | ||
| ) | ||
| } |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.