mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 06:49:18 +01:00
Adds Google Analytics Support
This commit is contained in:
parent
fe4a4b1d8f
commit
326c15a9fc
@ -9,4 +9,6 @@ siteEmailUrl = "#"
|
||||
siteRssUrl = "#"
|
||||
siteVkUrl = "#"
|
||||
|
||||
googleAnalyticsId = ""
|
||||
|
||||
linkPrefix = "/gatsby-starter-lumen"
|
8
gatsby-browser.js
Normal file
8
gatsby-browser.js
Normal file
@ -0,0 +1,8 @@
|
||||
import ReactGA from 'react-ga'
|
||||
import {config} from 'config'
|
||||
|
||||
ReactGA.initialize(config.googleAnalyticsId);
|
||||
|
||||
exports.onRouteUpdate = (state, page, pages) => {
|
||||
ReactGA.pageview(state.pathname);
|
||||
};
|
@ -31,12 +31,12 @@
|
||||
"gatsby": "^0.12.0",
|
||||
"history": "^2.1.1",
|
||||
"lodash": "^4.14.1",
|
||||
"moment": "^2.14.1",
|
||||
"markdown-it": "^6.0.2",
|
||||
"moment": "^2.14.1",
|
||||
"react": "^15.3.0",
|
||||
"react-document-title": "^2.0.2",
|
||||
"react-dom": "^15.3.0",
|
||||
"react-google-analytics": "^0.2.0",
|
||||
"react-ga": "^2.1.2",
|
||||
"react-router": "^2.6.1",
|
||||
"safe-access": "^0.1.0",
|
||||
"underscore.string": "^3.2.3"
|
||||
|
Loading…
Reference in New Issue
Block a user