File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function TierCTAButton({ tier }: { tier: Tier }) {
7676 }
7777
7878 if ( session . planType === "free" ) {
79- track ( "Signup " , { tier : tier . id } ) ;
79+ track ( "Checkout " , { tier : tier . id } ) ;
8080 e . preventDefault ( ) ;
8181 e . stopPropagation ( ) ;
8282 await authClient . checkout ( {
Original file line number Diff line number Diff line change 99 useEffect ,
1010 useState ,
1111} from "react" ;
12+ import { track } from "@vercel/analytics" ;
1213
1314import ThemedImage from "@/components/ThemedImage" ;
1415import blockNoteLogo from "@/public/img/logos/banner.svg" ;
@@ -69,6 +70,7 @@ function AuthenticationBox(props: {
6970 setSigningInState ( { state : "loading" } ) ;
7071
7172 if ( props . variant === "password" ) {
73+ track ( "Sign In" , { type : "password" } ) ;
7274 await signIn . email (
7375 {
7476 email,
@@ -88,6 +90,7 @@ function AuthenticationBox(props: {
8890 } ,
8991 ) ;
9092 } else if ( props . variant === "email" ) {
93+ track ( "Sign In" , { type : "magic-link" } ) ;
9194 await signIn . magicLink (
9295 {
9396 email,
@@ -117,6 +120,7 @@ function AuthenticationBox(props: {
117120 } ,
118121 ) ;
119122 } else {
123+ track ( "Create Account" ) ;
120124 await signUp . email (
121125 {
122126 email,
@@ -318,12 +322,13 @@ function GitHubSignInButton() {
318322 />
319323 </ svg >
320324 }
321- onClick = { async ( ) =>
325+ onClick = { async ( ) => {
326+ track ( "Sign In" , { type : "github" } ) ;
322327 await signIn . social ( {
323328 provider : "github" ,
324329 callbackURL,
325- } )
326- }
330+ } ) ;
331+ } }
327332 />
328333 ) ;
329334}
You can’t perform that action at this time.
0 commit comments