GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
100 stars 52 forks source link

Create events in Post-Hog for GW2 Welcome Rewards #4276

Closed decentralauren closed 1 week ago

decentralauren commented 3 weeks ago

The events we want to track into posthog:

  1. Claimed on both chains
  2. Interacted with wallet-connect
  3. Interacted with invite rewards
  4. used send-via-address
  5. used bridge

The only identifiable data we need is the wallet-address.

Technical implementation

To capture events in posthog:

posthog.capture('claimed-both', {
    address: <wallet-address>,
})

A method should be added to the AnalyticsClass for handling the sending of events (similar to any other provider)

sirpy commented 3 weeks ago

@L03TJ3 if these are just boolean then it would be better to use .identify and set them as a property instead of sending an event each time. we have limited events on posthog

L03TJ3 commented 2 weeks ago

@sirpy identify is something you do at the start of user-session (so that any events in the sessions can/will be linked to a user-profile)

Not sure I see how you suggest to use identify to track these events:

Interacted with wallet-connect Interacted with invite rewards used send-via-address used bridge

sirpy commented 2 weeks ago

you should be able to call identify multiple times. or you can contact posthog to ask if there's a way to update a user property without triggering an event (ie so it isnt counted towards the limits) or if you can call identify multiple times

L03TJ3 commented 2 weeks ago

identify does nothing but to setup a person_profile.

doing any events involving a person profile is 4x as expensive according to their docs.

L03TJ3 commented 1 week ago

We decided after some suggestions that we won't track these events with posthog. We will create a cohort based location/app used.

It is undecided if we include wallet-address as identifiable ID.

Since that is all outside of scope of this ticket, it will be closed. The commits done around this will be reverted from this pr: https://github.com/GoodDollar/GoodDAPP/pull/4279