mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 14:59:14 +01:00
Merge pull request #15 from abisz/master
Adds Google Analytics Support (closes #12)
This commit is contained in:
commit
512a7d471d
@ -9,4 +9,6 @@ siteEmailUrl = "#"
|
|||||||
siteRssUrl = "#"
|
siteRssUrl = "#"
|
||||||
siteVkUrl = "#"
|
siteVkUrl = "#"
|
||||||
|
|
||||||
|
googleAnalyticsId = ""
|
||||||
|
|
||||||
linkPrefix = "/gatsby-starter-lumen"
|
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",
|
"gatsby": "^0.12.0",
|
||||||
"history": "^2.1.1",
|
"history": "^2.1.1",
|
||||||
"lodash": "^4.14.1",
|
"lodash": "^4.14.1",
|
||||||
"moment": "^2.14.1",
|
|
||||||
"markdown-it": "^6.0.2",
|
"markdown-it": "^6.0.2",
|
||||||
|
"moment": "^2.14.1",
|
||||||
"react": "^15.3.0",
|
"react": "^15.3.0",
|
||||||
"react-document-title": "^2.0.2",
|
"react-document-title": "^2.0.2",
|
||||||
"react-dom": "^15.3.0",
|
"react-dom": "^15.3.0",
|
||||||
"react-google-analytics": "^0.2.0",
|
"react-ga": "^2.1.2",
|
||||||
"react-router": "^2.6.1",
|
"react-router": "^2.6.1",
|
||||||
"safe-access": "^0.1.0",
|
"safe-access": "^0.1.0",
|
||||||
"underscore.string": "^3.2.3"
|
"underscore.string": "^3.2.3"
|
||||||
|
Loading…
Reference in New Issue
Block a user