A Gridsome plugin to enable the easy addition of Google Gtag analytics script to your Gridsome based website
npm install gridsome-plugin-gtag shell script
npm i gridsome-plugin-gtag
`Put your Google Analytics ID in you environment variables with a name
similar to
GOOGLE_ANALYTICS_ID.Then add the following to you
gridsom.config.js plugins array`shell script
{
use: 'gridsome-plugin-gtag',
options: {
config: {
id: process.env.GOOGLE_ANALYTICS_ID,
},
},
},
``