Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danwebb/react-static-plugin-google-analytics
A React-Static plugin that adds Google Analytics tracking
https://github.com/danwebb/react-static-plugin-google-analytics
Last synced: 2 months ago
JSON representation
A React-Static plugin that adds Google Analytics tracking
- Host: GitHub
- URL: https://github.com/danwebb/react-static-plugin-google-analytics
- Owner: DanWebb
- Created: 2018-09-28T14:48:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T14:49:04.000Z (over 6 years ago)
- Last Synced: 2024-10-03T22:41:02.943Z (3 months ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# react-static-plugin-google-analytics
A [React-Static](https://react-static.js.org) plugin that adds [Google Analytics tracking](https://analytics.google.com/analytics/web/)
## Installation
In an existing React-Static site run:
```bash
$ yarn add react-static-plugin-google-analytics
```Then add the plugin to the default export of your `static.config.js` and specify your [Google Analytics traking ID](https://support.google.com/analytics/answer/7476135?hl=en) inside an options variable:
```javascript
export default {
plugins: [
["react-static-plugin-google-analytics", {id: 'GOOGLE ANALYTICS ID'}]
]
};
```For more info on React-Static plugins [see the docs](https://github.com/nozzle/react-static/blob/v6/docs/plugins.md).