File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import MeetingInfoSection from '@/components/meeting/MeetingInfoSection';
1515import { useToast } from '@/hooks/useToast' ;
1616import Toast from '@/components/ui/toast' ;
1717import { getMeetingUserId , removeMeetingUserId } from '@/lib/storage' ;
18-
18+ import { sendGAEvent } from '@next/third-parties/google' ;
1919interface StationInfo {
2020 line : string ;
2121 name : string ;
@@ -127,6 +127,21 @@ export default function Page() {
127127 show ( ) ;
128128 return ;
129129 }
130+
131+ if ( typeof window !== 'undefined' ) {
132+ const calculationType = id ? 'recalculated' : 'first' ;
133+ const isHost = localStorage . getItem ( `browser_id` ) !== null ;
134+ const role_type = isHost ? 'host' : 'participant' ;
135+ const browserId = localStorage . getItem ( 'browser_id' ) ;
136+
137+ sendGAEvent ( 'event' , 'midpoint_calculated' , {
138+ meeting_url_id : id ,
139+ browser_id : browserId ,
140+ role : role_type ,
141+ calculation_type : calculationType ,
142+ } ) ;
143+ }
144+
130145 router . push ( `/result/${ id } ` ) ;
131146 } ;
132147
You can’t perform that action at this time.
0 commit comments