feat(analytics): add behavior and payment funnel tracking
This commit is contained in:
@@ -46,7 +46,11 @@ export function SidebarScreen() {
|
||||
<div className={styles.bgOrbTwo} aria-hidden="true" />
|
||||
|
||||
<div className={styles.topBar}>
|
||||
<BackButton href={ROUTES.chat} variant="soft" />
|
||||
<BackButton
|
||||
href={ROUTES.chat}
|
||||
variant="soft"
|
||||
analyticsKey="sidebar.back_to_chat"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<section className={`${styles.userSlot} ${styles.revealOne}`}>
|
||||
@@ -68,10 +72,25 @@ export function SidebarScreen() {
|
||||
dailyFreePrivateRemaining={view.wallet.dailyFreePrivateRemaining}
|
||||
onActivateVip={
|
||||
view.canActivateVip
|
||||
? () => navigator.openSubscription({ type: "vip" })
|
||||
? () =>
|
||||
navigator.openSubscription({
|
||||
type: "vip",
|
||||
analytics: {
|
||||
entryPoint: "sidebar",
|
||||
triggerReason: "vip_cta",
|
||||
},
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
onTopUp={() => navigator.openSubscription({ type: "topup" })}
|
||||
onTopUp={() =>
|
||||
navigator.openSubscription({
|
||||
type: "topup",
|
||||
analytics: {
|
||||
entryPoint: "sidebar",
|
||||
triggerReason: "sidebar_recharge",
|
||||
},
|
||||
})
|
||||
}
|
||||
onRulesClick={() => navigator.push(ROUTES.coinsRules)}
|
||||
/>
|
||||
</section>
|
||||
@@ -103,6 +122,8 @@ export function SidebarScreen() {
|
||||
|
||||
<button
|
||||
type="button"
|
||||
data-analytics-key="sidebar.logout"
|
||||
data-analytics-label="Log out"
|
||||
className={styles.logoutCard}
|
||||
onClick={handleLogoutClick}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user