export const GA_TRACKING_ID = process . env . NEXT_PUBLIC_GA_ID ; type GTagEvent = { action : string ; category : string ; label : string ; value : number ; } ; export const pageview = ( url ) => { if ( typeof GA_TRACKING_ID === "string" ) { window . gtag ( "config" , GA_TRACKING_ID , { page_path : url , } ) ; } } ; export const event = ( { action , category , label , value } ) => { window . gtag ( "event" , action , { event_category : category , event_label : label , value : value , } ) ; } ;