mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 12:42:28 +02:00
Adds Google Analytics Support
This commit is contained in:
@@ -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"
|
||||
@@ -65,4 +65,4 @@
|
||||
"rucksack-css": "^0.8.5",
|
||||
"lost": "^7.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user