Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manusa/gatsby-plugin-google-analytics-gtag
https://github.com/manusa/gatsby-plugin-google-analytics-gtag
gatsby gatsby-plugin google-analytics
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/manusa/gatsby-plugin-google-analytics-gtag
- Owner: manusa
- License: apache-2.0
- Created: 2021-11-21T04:59:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-02T12:52:54.000Z (12 months ago)
- Last Synced: 2025-01-10T16:29:31.992Z (about 1 month ago)
- Topics: gatsby, gatsby-plugin, google-analytics
- Language: JavaScript
- Homepage:
- Size: 2.42 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-google-analytics-gtag
[![npm](https://img.shields.io/npm/v/gatsby-plugin-google-analytics-gtag)](https://www.npmjs.com/package/gatsby-plugin-google-analytics-gtag)Gatsby plugin to add Google Analytics support to your site leveraging Google's [gtag.js](https://developers.google.com/tag-platform/gtagjs) library.
The main difference with the official Gatsby plugins is that this one doesn't use cookies to track visitors.
## Usage
```javascript
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` |