gatsby-plugin-google-analytics-gtag
v0.0.13
Published
Plugin to use Google Analytics (gtag.js) without cookies
Downloads
144
Maintainers
Readme
gatsby-plugin-google-analytics-gtag
Gatsby plugin to add Google Analytics support to your site leveraging Google's gtag.js library.
The main difference with the official Gatsby plugins is that this one doesn't use cookies to track visitors.
Usage
plugins: [
{
resolve: 'gatsby-plugin-google-analytics-gtag',
options: {
trackingId: 'UA-YOURIDHERE-1',
enableSessionStorage: true,
consentMode: 'granted'
}
},
]
| Option | Description | Values |
|----------------|-----------------------------------------------|-----------------------|
| constentMode
| Allows to specify the default consent options | denied
or granted
|