-
Notifications
You must be signed in to change notification settings - Fork 3
track additional browse events in posthog #2011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n "Browse by Topic"
| href={channelUrl ? new URL(channelUrl!).pathname : ""} | ||
| onClick={() => { | ||
| if (process.env.NEXT_PUBLIC_POSTHOG_API_KEY) { | ||
| posthog.capture("home_topic_clicked", { topic: name }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something to consider - we have a bunch of these bare event strings. it might be good to have them defined as constants somewhere so its easier to track and change
shanbady
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worked when i tested it. received all the events. left minor non-blocking suggestion
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/6624
Description (What does it do?)
This PR corrects some Posthog tracking behavior in relation to the "browse" workflow on the site, more specifically regarding topics / subtopics / related topics.
How can this be tested?
clicked_hero_browse_topicseventtopic_clickedeventhome_see_all_topics_clickedeventtopic_clickedeventsubtopic_clickedeventsubtopic_clickedeventrelated_topic_clickedevent