threshold-network / token-dashboard

22 stars 23 forks source link

Implement minting and unminting funnels in posthog #739

Closed michalsmiarowski closed 5 months ago

michalsmiarowski commented 6 months ago

Ref: #731 #732

Implements functionality that will send minting and unminting related events to Posthog.

Breakdown of the events sent to Posthog:

1. Wallet Connected

Initially this event was meant to be sent when the Connect Wallet button is clicked but we didn't have information about the address that is connected yet at this point. We didn't have the balance info too.

That's why this event is sent when the account from the useWeb3React hook changes. Besides that, we also check if the token balance was loaded based on the currently connected account (with the new value in token store - isLoadedFromConnectedAccount). This was needed, because initially the balance value is set to 0 so we can't recognize if the value is loaded for account or not based on just balance and loading value.

With the Wallet Connected event we send three properties, which are:

2. Wallet Disconnected

Simply just sends an event when the wallet is disconnected.

(Minting flow:)

3. (Autocapture event) Deposit Address Generated

This is a default autocapture event but with additional parameters so that it's easier to track it. The addtional parameters are:

The autocapture tracks every click of the user by default, but additional parameters are added only when Generate Deposit Address button is clicked

4. (Autocapture event) Minting initiated

This is a default autocapture event but with additional parameters so that it's easier to track it. The addtional parameters are:

(Unminting flow:)

5. (Autocapture event) Unminting initiated

This is a default autocapture event but with additional parameters so that it's easier to track it. The addtional parameters are:

Note: Bear in mind that this event is only for Unmint button in InitiateMinting modal. It does not track the Unmint button in Unmint page.

github-actions[bot] commented 6 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/mint-and-unmint-funnels-in-posthog/index.html.

github-actions[bot] commented 6 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/mint-and-unmint-funnels-in-posthog/index.html.

github-actions[bot] commented 6 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/mint-and-unmint-funnels-in-posthog/index.html.

github-actions[bot] commented 6 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/mint-and-unmint-funnels-in-posthog/index.html.

github-actions[bot] commented 5 months ago

Preview uploaded to https://preview.dashboard.test.threshold.network/mint-and-unmint-funnels-in-posthog/index.html.