NEAR-DevHub / neardevhub-bos

NEAR DevHub UI hosted on NEAR BOS
https://neardevhub.org
MIT License
23 stars 22 forks source link

Improve User Referral and Journey Tracking in PostHog #879

Open ori-near opened 1 month ago

ori-near commented 1 month ago

Problem

Our current PostHog reports lack the details needed to understand how users find and navigate our DevHub platform. This makes it difficult to know which engagement activities are working and what we need to improve in the user journey.

User Story

As the Moderator in charge of developer engagement (Joe), I want to see reports in PostHog that provide insights into user referral and user journeys so that I can optimize our strategies based on data.

Acceptance Criteria

Tguntenaar commented 1 month ago

In order to track bounce rate I turned on autocapture in the PostHog dashboard settings as mentioned in the docs

Edit: To my knowledge autocapture won't work if we can't call posthog.init(. Also tracking $pageleave events won't work without access to the window object or packages like react-router-dom.

frol commented 1 month ago

@Tguntenaar Bringing your discussion from https://github.com/NEAR-DevHub/neardevhub-contract/pull/142#pullrequestreview-2186259934.

Consider starting with checking if it would be enough if Joe will start adding extra props to all links he shares, e.g. https://devhub.near.page/proposal/155?r=i, where r stands for referral and i for Instagram. If we pass there props in, and capture all the props in our Posthog already, that should be enough. We don't need to add anything specific to our domain specifically, I believe

Tguntenaar commented 1 month ago

Thanks for the tip! That would work for the refferral tracking, but not the bounce rate / user paths.

telegram-cloud-photo-size-4-5821461066444555807-y

Also, I've been playing around in a "test" dashboard. While trying to add a new insight to trace where they drop off posthog asked to upgrade to have advanced path insights. @frol Can we opt-in for that?

Tguntenaar commented 1 month ago

To improve referrer tracking we made a spreadsheet to standerdize the query parameters of sharable links.