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

Track usage #82

Closed
groupsky opened this issue Jun 23, 2015 · 9 comments
Closed

Track usage #82

groupsky opened this issue Jun 23, 2015 · 9 comments

Comments

@groupsky
Copy link
Contributor

Some form of analytics (like google analytics provides for websites) to track usage and version distributions would be helpful. Not sure how the privacy should be approached - maybe a opt-on/opt-out setting.

@jerone
Copy link
Contributor

jerone commented Jun 23, 2015

I've seen this in other packages too and would like to have it. Do you know what needs to be done to get this implemented?

@groupsky
Copy link
Contributor Author

I can examine the other packages. Can you point to some where you saw that?

@jerone
Copy link
Contributor

jerone commented Jun 23, 2015

Open up your config.cson and look for packages that have the _analyticsUserId property:

@jerone
Copy link
Contributor

jerone commented Jun 23, 2015

Interesting: https://github.com/atom/metrics

@groupsky
Copy link
Contributor Author

It seems that both packages (atom-beautify and preview) are using analytics-node which is backed by Segment to report data to Google Analytics.

The actual code to track and report is pretty strightforward:

@jerone
Copy link
Contributor

jerone commented Jun 27, 2015

So I thought I give this a try: https://github.com/jerone/atom-sync-settings/tree/features/tracking

I've installed analytics-node (npm install --save analytics-node) and setup an account on Segment with GA activated.

I'm seeing some data in Segment:
2015-06-27 16_52_34-tracking plan - segment

But I'm struggling to get this visible in GA, my knowledge about GA is too limited I noticed.

@groupsky
Copy link
Contributor Author

I managed to see it in GA just by replacing the segments key with my own. In GA you usually see the stats from previous month excluding the current day. In live view you can see for events from the tracking. One thing to note - I had to use the long write key, instead of the short api key (the latter says is for enterprise users - no idea what that is).

A working example with some additional features can be seen at my branch

@jerone
Copy link
Contributor

jerone commented Jun 29, 2015

Scanned trough your code; your are not using Segment anymore?

@groupsky
Copy link
Contributor Author

I'm using it, just extracted the tracking into separate class.

@groupsky groupsky mentioned this issue Jun 29, 2015
4 tasks
@jerone jerone added this to the v0.6.0 milestone Jul 10, 2015
@jerone jerone closed this as completed in ad4f6a3 Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants