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

feat: analytics #1068

Merged
merged 14 commits into from
Sep 12, 2019
Merged

feat: analytics #1068

merged 14 commits into from
Sep 12, 2019

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Aug 30, 2019

This adds Analytics to IPFS Desktop using our Countly setup. This PR, in pair with the one on IPFS Web UI repository, make a seamless integration between both Countly setups: we share the device id and the consents so we know on both sides what we can and can't send.

For this to work, I just created some wrappers around the logging functions to allow to send an event with it. If it has an event (withAnalytics), we log the event to Countly.

Also, created a logger.start function that allows us to measure, log and track time of certain actions, such as starting and stopping the daemon.

Please ignore CI failures...

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias marked this pull request as ready for review September 1, 2019 09:55
Copy link
Member

@olizilla olizilla left a comment

Choose a reason for hiding this comment

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

If we make "how long was desktop running in the tray" the session, then it becomes hard to determine how long they actually used the application for. I would say "time spent interacting with the app" is a better session duration indicator. We could add events for desktop-only interactions, and it's kinda ok if they happen outside of countly sessions. It would be fun to know how long folks leave ipfs-desktop running, but ultimately it's less valuable info than "do they use it"...

Also it's important to inform the user about what events are tracked. The current impl show the user all the webui events that get logged. We need to keep that accurate as it's there so users trust that we tell them exactly what we tracking.

… webui

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member Author

hacdias commented Sep 2, 2019

@olizilla the requested changes were made:

  1. We now track sessions on Web UI as we did.
  2. We now provide the list of the events we track to Web UI so they can be shown to the user.
  3. And I also moved the feature enabling/disabling tracking to Web UI (when the user clicks to toggle options).

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias
Copy link
Member Author

hacdias commented Sep 11, 2019

@olizilla after we talked, I tried moving all the logic to Web UI side to keep the countly id and such the same so there wouldn't be any problems. Although, that way, since the Web UI sometimes reloads (when the daemon stops and starts) or due to other reasons (user forced reload, we updated the files list), we won't be able to capture all events. Some of them are quite important such as daemon's starting time.

Although, I found out we could actually merge the old ID data with the new: ipfs/ipfs-webui@d20980f.

Waiting for a review now :)

@hacdias hacdias merged commit a884bb9 into master Sep 12, 2019
@hacdias hacdias deleted the feat/analytics branch September 12, 2019 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved Analytics
2 participants