ojacquemart / vlilleChecker

Android Vlille Checker app
https://play.google.com/store/apps/details?id=com.vlille.checker
GNU General Public License v3.0
13 stars 12 forks source link

Feature/analytics #133

Closed paynemiller92 closed 5 years ago

paynemiller92 commented 5 years ago

Vlille Checker Anaytics

Overview of Changes

  1. Integrated Google Analytics v4 as a dependency, and configured the build to include our ID.
  2. Created a new manager class, Analytics Manager that handles all calls to Google Analytics.
  3. Added calls to send Analytics calls to AnalyticsManager from every visible Fragment and Activity.

Strategy

I tried to design this in a way that was intutive and was easy for you to make additions to. Ideally, you can just add more methods for different analytics you wish to capture (i.e. something besides an event or screen view)

Exampes of Analytic Calls

Metric Example
Screen View AnalyticsManager.trackScreenView("About Screen");
Click Event AnalyticsManager.trackEvent("Home Screen", "Settings Tab Clicked", "Click");
ojacquemart commented 5 years ago

Thansk! Good job :)

I do not know how GA works for mobile apps. Is there a way to stop the tracking actions? I closed the app and a few minutes later, GA tells me that there is still an active user.

paynemiller92 commented 5 years ago

@ojacquemart I updated the onStop() call to onStart() LOL autocorrect got me there. I researched the active user issue and it seems that the Active Users number is actually the number of users active within the past 30 days! See this link.

ojacquemart commented 5 years ago

Ok, the active number now displays 0.

Could you squash your commits after the typo fix? I am using git karma. You could take a look at: http://karma-runner.github.io/3.0/dev/git-commit-msg.html

paynemiller92 commented 5 years ago

@ojacquemart sure thing. I will even update the README here in a bit to make using git-karma part of the Contribution Guide.

paynemiller92 commented 5 years ago

@ojacquemart updated the commit. Let me know if the format is correct!

ojacquemart commented 5 years ago

LGTM :+1:

Thanks for your contribution. Hacktoberfest rocks!