Skip to content
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

Integrating June tracking tool #2126

Merged
merged 16 commits into from
Apr 17, 2024
Merged

Integrating June tracking tool #2126

merged 16 commits into from
Apr 17, 2024

Conversation

hthillman
Copy link
Contributor

@hthillman hthillman commented Apr 4, 2024

This tool allows us to track users through their onboarding journey.

Testing instructions:

**note: I've disabled the identifyUser step for staging, so you'll need to run locally - you can also use the preview from 3860bc8 if you want but probably better to run locally **

We will need to check functionality of everywhere I've added June events.

  • API key creation
  • docs and feedback links in header
  • all sidebar navlinks
  • creation of multistream targets
  • recording toggle
  • render of stream health tab in stream detail page
  • embed and copy links on stream detail page
  • stream go live
  • stream key copy
  • landing page billing cta
  • billing page usage cta
  • registration / account creation
  • login flows

I've also ripped out the Ripe integration points for now, can revert if needed

Copy link

vercel bot commented Apr 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 5:48pm

@hthillman hthillman changed the title DRAFT: first pass integrating June tracking tool Integrating June tracking tool Apr 5, 2024
@hthillman hthillman marked this pull request as ready for review April 5, 2024 19:07
@hthillman hthillman requested a review from a team as a code owner April 5, 2024 19:07
Copy link
Member

@adamsoffer adamsoffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove additional instances of Ripe:

import Ripe, { categories, pages } from "lib/ripe";

import Ripe, { categories, pages } from "lib/ripe";

Also need to remove ripe.js file:

packages/www/components/Header/index.tsx Outdated Show resolved Hide resolved
@adamsoffer
Copy link
Member

When I navigate to a stream detail view and then refresh the page I get an error that June isn't available on window. @suhailkakar can you help debug this issue?

CleanShot 2024-04-10 at 16 35 41@2x

@hthillman
Copy link
Contributor Author

When I navigate to a stream detail view and then refresh the page I get an error that June isn't available on window. @suhailkakar can you help debug this issue?

CleanShot 2024-04-10 at 16 35 41@2x

@adamsoffer I wonder if the identify call is in the wrong place, and track is not available until after identification. I thought I put it somewhere that would get initialized upfront every time but maybe there's a race condition

@suhailkakar
Copy link
Member

suhailkakar commented Apr 15, 2024

hey @hthillman

  • i've replaced the script and window.analytics object with the June next.js sdk[1] and a hook
  • all the implementational will be same, but instead of importing June from ../lib/June, we are using the June hook
import { useJune, events } from "hooks/use-june";
const June = useJune();
  • i've tested and all the tracks events are being sent to June
image

cc: @adamsoffer

[1] https://www.june.so/docs/tracking/web/react

@suhailkakar
Copy link
Member

Also, the big "file changes" are just types issue related to livepeer/design library which is also fixed

useEffect(() => {
const loadAnalytics = async () => {
let response = AnalyticsBrowser.load({
writeKey: "3VINzqYVjfOxFyIr",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, if this needs to be added to .env. Please feel free to move it from here if it needs to kept private.

Copy link
Member

@adamsoffer adamsoffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @suhailkakar !

@adamsoffer adamsoffer merged commit 9ddfa24 into master Apr 17, 2024
10 checks passed
@adamsoffer adamsoffer deleted the hh-june-integration branch April 17, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants