File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { CheckIcon } from "@heroicons/react/20/solid";
44import { track } from "@vercel/analytics" ;
55import classNames from "classnames" ;
66import React from "react" ;
7+ import * as Sentry from "@sentry/nextjs" ;
78
89type Frequency = "month" | "year" ;
910
@@ -76,6 +77,13 @@ function TierCTAButton({ tier }: { tier: Tier }) {
7677 }
7778
7879 if ( session . planType === "free" ) {
80+ Sentry . captureEvent ( {
81+ message : "Checkout" ,
82+ level : "info" ,
83+ extra : {
84+ tier : tier . id ,
85+ } ,
86+ } ) ;
7987 track ( "Checkout" , { tier : tier . id } ) ;
8088 e . preventDefault ( ) ;
8189 e . stopPropagation ( ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 useState ,
1111} from "react" ;
1212import { track } from "@vercel/analytics" ;
13+ import * as Sentry from "@sentry/nextjs" ;
1314
1415import ThemedImage from "@/components/ThemedImage" ;
1516import blockNoteLogo from "@/public/img/logos/banner.svg" ;
@@ -71,6 +72,13 @@ function AuthenticationBox(props: {
7172
7273 if ( props . variant === "password" ) {
7374 track ( "Sign In" , { type : "password" } ) ;
75+ Sentry . captureEvent ( {
76+ message : "Sign In" ,
77+ level : "info" ,
78+ extra : {
79+ type : "password" ,
80+ } ,
81+ } ) ;
7482 await signIn . email (
7583 {
7684 email,
@@ -91,6 +99,13 @@ function AuthenticationBox(props: {
9199 ) ;
92100 } else if ( props . variant === "email" ) {
93101 track ( "Sign In" , { type : "magic-link" } ) ;
102+ Sentry . captureEvent ( {
103+ message : "Sign In" ,
104+ level : "info" ,
105+ extra : {
106+ type : "magic-link" ,
107+ } ,
108+ } ) ;
94109 await signIn . magicLink (
95110 {
96111 email,
@@ -121,6 +136,13 @@ function AuthenticationBox(props: {
121136 ) ;
122137 } else {
123138 track ( "Create Account" ) ;
139+ Sentry . captureEvent ( {
140+ message : "Sign Up" ,
141+ level : "info" ,
142+ extra : {
143+ type : "email" ,
144+ } ,
145+ } ) ;
124146 await signUp . email (
125147 {
126148 email,
@@ -324,6 +346,13 @@ function GitHubSignInButton() {
324346 }
325347 onClick = { async ( ) => {
326348 track ( "Sign In" , { type : "github" } ) ;
349+ Sentry . captureEvent ( {
350+ message : "Sign In" ,
351+ level : "info" ,
352+ extra : {
353+ type : "github" ,
354+ } ,
355+ } ) ;
327356 await signIn . social ( {
328357 provider : "github" ,
329358 callbackURL,
You can’t perform that action at this time.
0 commit comments