Giveth / impact-graph

MIT License
49 stars 18 forks source link

P2 | Queries to fetch stats about new donors #1407

Closed divine-comedian closed 2 months ago

divine-comedian commented 6 months ago

According to our planned OKRs for Dapp WG we want to track some information about new donors for our marketing & comms efforts.

We would like to be able to query two things:

This we will need to run at least once every month... If we think it's worth the work we can add the queries into the stats.giveth.io page so the devs don't need to be responsible for doing this all the time.

@jainkrati - for your info - I would recommend @RamRamez for this one!

jainkrati commented 6 months ago

@RamRamez pls work on this once p0 issues are solved. @mohammadranjbarz pls guide him only if he is blocked.

RamRamez commented 6 months ago

@maryjaf to test and verify

RamRamez commented 6 months ago

@maryjaf You can test it with this link on staging and after SuperFluid release, you can test it on production with the main URL (https://stats.giveth.io/)

divine-comedian commented 6 months ago

In order to test this issue:

  1. make a new user on Giveth (or use an existing profile that has never made any donation before)
  2. make a donation on giveth staging with a token with a tracked price (ETH is always good)
  3. check results on stats dashboard https://analytics-dashboard-git-add-new-donors-count-givethio.vercel.app/
  4. results should be reflected correctly - new user count should increase by 1, and New Donors Donation Total USD
  5. value of first donation should be reflect as well

If the test goes well make a 2nd new user and repeat steps 2-5

What should not happen

maryjaf commented 3 months ago

-when I donate with a new user without any donation these fields be increased as expected Donations Count:will increase Donors Count:will increase

-when I donate again with this user Donors Count Donors Count: remains unchanged Donations Count : will increase

-when I donate with a new user but anonymous Donors Count: remains unchanged Donations Count : will increase

and for these new fields, by donating first time with new user these fileds be increased and for second time remains unchanged

New Donors Count New Donors Donation Total USD

maryjaf commented 3 months ago

Should recurring donation be considered in this calculation? or it needs a separate issue ? @RamRamez @divine-comedian

divine-comedian commented 3 months ago

Should recurring donation be considered in this calculation? or it needs a separate issue ? @RamRamez @divine-comedian

We'll track some statistics regarding recurring donations here - #1243

However great question! We should consider recurring donations

Q: @RamRamez - when a user makes an anonymous donation we know which address they made it from, as in we track it in the BE or does it show as anonymous on our DB on the donation record?

If we know the user is a new donor even if the donation was made anonymously on our UI then we should be able to count them as new donors..

RamRamez commented 3 months ago

Should recurring donation be considered in this calculation? or it needs a separate issue ? @RamRamez @divine-comedian

We'll track some statistics regarding recurring donations here - #1243

However great question! We should consider recurring donations

  • [ ] when a new user without any doantions makes a recurring donation that should increase the new donor count
  • [ ] the value of my recurring donations should increase the donations count as a new user
  • [ ] making another recurring donation from same new user should not increase new donor count, but it should increase donations count

Q: @RamRamez - when a user makes an anonymous donation we know which address they made it from, as in we track it in the BE or does it show as anonymous on our DB on the donation record?

If we know the user is a new donor even if the donation was made anonymously on our UI then we should be able to count them as new donors..

For anonymous donations, we save fromWalletAddress field in DB and we keep anonymous field checked.

divine-comedian commented 3 months ago

@RamRamez so we could know if a donor is a new donor, even if they marked the donation as anonymous, correct?

RamRamez commented 3 months ago

@RamRamez so we could know if a donor is a new donor, even if they marked the donation as anonymous, correct?

Yes, we can check for the userId

divine-comedian commented 3 months ago

@RamRamez so we could know if a donor is a new donor, even if they marked the donation as anonymous, correct?

Yes, we can check for the userId

Ok, let's add that in please to our stats fetching related to this issue.