A small NPM package to handle inserting scripts required for Google Analytics to send analytics via a React component.
- tag - Your analytics tag ID.
import { GoogleAnalytics } from "deaconn-google-analytics" ... return ( <head> <GoogleAnalytics tag="mytagID" /> </head> );You may install the component using the NPM package manager.
npm install deaconn-google-analytics