Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a33d5d2

Browse files
committedMar 14, 2018
Improved google analytics support
1 parent 111cf7a commit a33d5d2

File tree

3 files changed

+808
-36
lines changed

3 files changed

+808
-36
lines changed
 

‎gatsby-config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ module.exports = {
66
plugins: [
77
`gatsby-plugin-react-helmet`,
88
`gatsby-plugin-styled-jsx`,
9-
`@jacobmischka/gatsby-plugin-react-svg`
9+
`@jacobmischka/gatsby-plugin-react-svg`,
10+
{
11+
resolve: `gatsby-plugin-google-analytics`,
12+
options: {
13+
trackingId: "UA-12613282-7"
14+
// Puts tracking script in the head instead of the body
15+
// head: false,
16+
// Setting this parameter is optional
17+
// anonymize: true,
18+
// Setting this parameter is also optional
19+
// respectDNT: true,
20+
}
21+
}
1022
]
1123
};

‎package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"version": "1.0.0",
55
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
66
"dependencies": {
7-
"@jacobmischka/gatsby-plugin-react-svg":
8-
"git+https://github.com/jacobmischka/gatsby-plugin-react-svg.git",
7+
"@jacobmischka/gatsby-plugin-react-svg": "git+https://github.com/jacobmischka/gatsby-plugin-react-svg.git",
98
"gatsby": "^1.9.73",
109
"gatsby-link": "^1.6.22",
10+
"gatsby-plugin-google-analytics": "^1.0.22",
1111
"gatsby-plugin-react-helmet": "^1.0.8",
1212
"gatsby-plugin-styled-jsx": "^1.0.11",
1313
"lost": "8.2.0",
@@ -18,17 +18,17 @@
1818
"rucksack-css": "^1.0.2",
1919
"styled-jsx-plugin-postcss": "0.1.0"
2020
},
21-
"keywords": ["gatsby"],
21+
"keywords": [
22+
"gatsby"
23+
],
2224
"license": "MIT",
2325
"main": "n/a",
2426
"scripts": {
2527
"clean": "rm -rf ./public",
2628
"create-sphinx-theme": "./scripts/create_package",
27-
"build":
28-
"yarn clean && gatsby build --prefix-paths && ./scripts/replace && yarn create-sphinx-theme",
29+
"build": "yarn clean && gatsby build --prefix-paths && ./scripts/replace && yarn create-sphinx-theme",
2930
"develop": "gatsby develop",
30-
"format":
31-
"prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.js'",
31+
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.js'",
3232
"test": "echo \"Error: no test specified\" && exit 1"
3333
},
3434
"devDependencies": {

‎yarn.lock

Lines changed: 788 additions & 28 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.