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: add analytics endpoints #195

Merged
merged 6 commits into from
Mar 7, 2024

Conversation

ayushtom
Copy link
Contributor

@ayushtom ayushtom commented Mar 5, 2024

We add the following endpoints in this PR -

  • /analytics/get_quest_activity - used to get the graph data for detecing number of people completing tasks each day.
  • /analytics/get_quest_participation - used to get total participants on each task of a quest
  • /analytics/get_unique_visitors - used to get total unique visits on a quest page
  1. Getting the graph data
    We run a mongodb query and computes tasks on a daily basis and returns all activity till date on the tasks of the quest.

  2. Getting the Quest Participation
    We get this data by checking the total count of tasks completed per task per quest

  3. Getting unique viewers
    We match the page id and count the total occurences which we get in the unique_viewers_collection

Issue link - lfglabs-dev/starknet.quest#313

@ayushtom ayushtom changed the title feat: add timestamps feat: add timestamps to models, add analytics endpoints Mar 6, 2024
@ayushtom ayushtom changed the title feat: add timestamps to models, add analytics endpoints feat: add analytics endpoints Mar 6, 2024
@ayushtom ayushtom changed the base branch from master to ayush/update-endpoints March 6, 2024 10:51
@ayushtom ayushtom force-pushed the ayush/analytics-endpoints branch from 33f44e9 to 880ebeb Compare March 6, 2024 11:16
@ayushtom ayushtom force-pushed the ayush/update-endpoints branch from 8729cee to 03c73fa Compare March 6, 2024 11:19
@ayushtom ayushtom self-assigned this Mar 6, 2024
@ayushtom ayushtom added the 🔥 Ready for review This pull request needs a review label Mar 6, 2024
@ayushtom ayushtom marked this pull request as ready for review March 6, 2024 16:02
@ayushtom ayushtom requested a review from Th0rgal March 6, 2024 16:12
@Th0rgal Th0rgal merged commit e114ac2 into ayush/update-endpoints Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 Ready for review This pull request needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants