DEV Community

Cover image for Created simple analytics feature on webstore.
Tazim Rahbar
Tazim Rahbar

Posted on

Created simple analytics feature on webstore.

Building Analytics feature is not easy at all you have to keep many things in your mind like getting user location, parsing user agent for getting browser details, os they are using, getting the device type based on window inner width.

So I am building a project called WebStore soon going to rebrand to Stackhub for a couple of months. It is the community for the developer to share their projects and view other developer projects, upvote them, message them(Basic Feature) and you can see the engagement of your appliaction through the analytics feature that i have built.

Dashboard Image

How I have built this

This can be explained in couple of points:
  • So whenever the user click on the visit button of the project.
  • Redirect the user to project url
  • Make an api request at two endpoints.
  • One is to update the number of time visited
  • And one is to log the analytic data into DB with data like date, browser, device, os ,country and refers.

When this process working fine after that at every 24 hours we need to generate the report of that project and delete the older analytics data to avoid flooding out database.
Soon you will able to use this feature on WebStore

Feature and Changed maybe I will add in future

*More beautiful user interface.
*Adding icons with reffers,browsers and os
*Filtering analytics data by dates,months,years
*Profile Visit Data

If anyone wants to work on this project with me please let me know in the comments.

Top comments (0)