Skip to content
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

Feature: analytics v2 #1453

Merged
merged 27 commits into from
Apr 23, 2020
Merged

Feature: analytics v2 #1453

merged 27 commits into from
Apr 23, 2020

Conversation

estebanmino
Copy link
Contributor

Description

Several updates to the events we're tracking based on https://docs.google.com/spreadsheets/d/1XYj78KAUytJQCKk1fD8pERxXsZRZ6aQhcMP5GJS5X8k/edit#gid=1878986372

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #1350

@estebanmino estebanmino added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Mar 23, 2020
@ibrahimtaveras00
Copy link
Contributor

ibrahimtaveras00 commented Apr 7, 2020

Issue 1:

Tapping on Instapay shows as Navigation Drawer > Logout (row 34 in spreadsheet)

Issue 2:

Metrics Opt Out doesn’t seem to be triggered (row 7 in spreadsheet)

Issue 3:

Taps on account icon and Taps on network isn't working (rows 97 and 98 in spreadsheet)

Issue 4:

Send Flow "confirm send" (“User taps ‘Send’ on review screen”) doesn’t seem to get triggered
Instead, this is the one that’s triggered = Adds Amount (row 288 in spreadsheet)

Issue 5:

Approve Request View tx details User taps ‘View details’ isn't working (row 34 in spreadsheet)

@estebanmino
Copy link
Contributor Author

@ibrahimtaveras00 everything was fixed but Issue 3, talked with @omnat and these are already implemented under other events

Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All fixes look good, QA Passed 👍

Copy link
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. I made some minor suggestions, and ask a couple of questions on things I was uncertain about.

Another thought, that does not need to be addressed in this PR, we can probably create a utility method for calls of type:

InteractionManager.runAfterInteractions(() => {			 
    Analytics.trackEvent(ANALYTICS_EVENT_OPTS.ONBOARDING_SELECTED_NO_THANKS);
});

That's an improvement to be made in another issue though.

@@ -69,6 +71,15 @@ const styles = StyleSheet.create({
}
});

const stepDescription = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps these should be included in metamask-mobile/app/util/analytics.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that

closing &&
InteractionManager.runAfterInteractions(() => {
Analytics.trackEventWithParameters(ANALYTICS_EVENT_OPTS.ONBOARDING_SELECTED_SKIP_TUTORIAL, {
View: stepDescription[step]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a convention of using a this.getTrackingParams method with trackEventWithParameters. Should we follow that same convention here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replied the same in another comment, if we use it just one time I don't think is a need for cleaner code, WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's fine

@@ -216,14 +217,13 @@ class OptinMetrics extends PureComponent {
* Callback on press confirm
*/
onConfirm = async () => {
await AsyncStorage.setItem('@MetaMask:metricsOptIn', 'agreed');
Analytics.enable();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is Analytics.enable(); no longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I added it on componentDidMount

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@@ -575,6 +588,9 @@ class Confirm extends PureComponent {
assetType
});
this.checkRemoveCollectible();
Analytics.trackEventWithParameters(ANALYTICS_EVENT_OPTS.SEND_FLOW_CONFIRM_SEND, {
network: providerType
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we follow the this.getTrackingParameters convention here? (I asked a similar question above)

Copy link
Contributor Author

@estebanmino estebanmino Apr 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only added getTrackingParameters on places where I used it more than one time, if we do it here it seems like boilerplate code to me

@danjm
Copy link
Contributor

danjm commented Apr 16, 2020

Also, have we anywhere documented all the params/properties we are sending to mixpanel?

@estebanmino estebanmino requested a review from danjm April 16, 2020 21:19
@estebanmino
Copy link
Contributor Author

@danjm left comments on yours and added an object to the utils file

  • Also, have we anywhere documented all the params/properties we are sending to mixpanel?: yes, I left the link on the description of this pr

@estebanmino estebanmino merged commit f295280 into develop Apr 23, 2020
@estebanmino estebanmino deleted the feature/analytics-v2 branch April 23, 2020 19:25
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* onboarding step 1

* finish onboarding

* finish onboarding

* instapay

* navigation

* wallet view

* not done yet

* now it's done

* receive

* added new events

* instapay

* send flow

* approve

* update send flow with data

* snaps

* fixes

* opt out

* snapps

* after await

* disbale internally

* Revert "disbale internally"

This reverts commit 426ed06.

* disbale internally

* utils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analytics update
3 participants