How i get Global site tag (gtag.js) - Google Analytics code example
Example 1: global site tag (gtag.js) - google analytics gatsby
Copygatsby-config.js: copy code to clipboardmodule.exports = { plugins: [ { resolve: `gatsby-plugin-google-analytics`, options: { // replace "UA-XXXXXXXXX-X" with your own Tracking ID trackingId: "UA-XXXXXXXXX-X", }, }, ],}
Example 2: global site tag (gtag.js) - google analytics gatsby
Copycopy code to clipboardnpm install --save gatsby-plugin-google-analytics