// Multiple products (previously known as trackers)ReactGA.initialize([{trackingId: "your GA measurement id",gaOptions: {...},// optionalgtagOptions: {...},// optional},{trackingId: "your second GA measurement id",},]);// Send pageview with a custom pathReactGA.send({hitType: "pageview",page: "/my-path",title: "Custom Title"});// Send a custom eventReactGA.event({category: "your category",action: "your action",label: "your label",// optionalvalue: 99,// optional, must be a numbernonInteraction: true,// optional, true/falsetransport: "xhr",// optional, beacon/xhr/image});
Reference
ReactGA.initialize(GA_MEASUREMENT_ID, options)
Parameter
Notes
GA_MEASUREMENT_ID
string Required
options.nonce
string Optional Used for Content Security Policy (CSP) more