DanWebb / react-static-plugin-google-analytics

A React-Static plugin that adds Google Analytics tracking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-static-plugin-google-analytics

A React-Static plugin that adds Google Analytics tracking

Installation

In an existing React-Static site run:

$ 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 inside an options variable:

export default {
  plugins: [
    ["react-static-plugin-google-analytics", {id: 'GOOGLE ANALYTICS ID'}]
  ]
};

For more info on React-Static plugins see the docs.

About

A React-Static plugin that adds Google Analytics tracking


Languages

Language:JavaScript 100.0%