Skip to content

Commit 1ac662e

Browse files
authored
Merge pull request linode#79 from alioso/DLC-177
DLC-177 implement google tag manager and remove old analytics
2 parents 685f650 + 024118e commit 1ac662e

File tree

4 files changed

+25
-29
lines changed

4 files changed

+25
-29
lines changed

gatsby-config.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,18 @@ module.exports = {
2727
},
2828
plugins: [
2929
{
30-
resolve: `gatsby-plugin-google-analytics`,
30+
resolve: "gatsby-plugin-google-tagmanager",
3131
options: {
32-
trackingId: "UA-177150-22",
33-
// Defines where to place the tracking script - `true` in the head and `false` in the body
34-
head: false,
35-
// Setting this parameter is optional
36-
anonymize: true,
37-
// Setting this parameter is also optional
38-
respectDNT: true,
39-
// Avoids sending pageview hits from custom paths
40-
exclude: [],
41-
// Delays sending pageview hits on route update (in milliseconds)
42-
pageTransitionDelay: 0,
43-
// Enables Google Optimize using your container Id
44-
optimizeId: "",
45-
// Enables Google Optimize Experiment ID
46-
experimentId: "",
47-
// Set Variation ID. 0 for original 1,2,3....
48-
variationId: "",
49-
// Any additional create only fields (optional)
50-
sampleRate: 5,
51-
siteSpeedSampleRate: 10,
52-
cookieDomain: "developers.linode.com"
32+
id: "GTM-KMRQBS6",
33+
34+
// Include GTM in development.
35+
// Defaults to false meaning GTM will only be loaded in production.
36+
includeInDevelopment: false,
37+
38+
// datalayer to be set before GTM is loaded
39+
// should be an object or a function that is executed in the browser
40+
// Defaults to null
41+
defaultDataLayer: { platform: "gatsby" }
5342
}
5443
},
5544
{

index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"gatsby": "^2.9.2",
1212
"gatsby-image": "^2.0.29",
1313
"gatsby-plugin-catch-links": "^2.1.2",
14-
"gatsby-plugin-google-analytics": "^2.1.4",
14+
"gatsby-plugin-google-tagmanager": "^2.1.9",
1515
"gatsby-plugin-manifest": "^2.0.17",
1616
"gatsby-plugin-netlify-cms": "^4.0.1",
1717
"gatsby-plugin-offline": "^2.0.22",

yarn.lock

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,13 @@
717717
dependencies:
718718
regenerator-runtime "^0.13.2"
719719

720+
"@babel/runtime@^7.6.0":
721+
version "7.6.0"
722+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205"
723+
integrity sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ==
724+
dependencies:
725+
regenerator-runtime "^0.13.2"
726+
720727
"@babel/template@^7.1.0", "@babel/template@^7.4.4":
721728
version "7.4.4"
722729
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237"
@@ -5386,12 +5393,12 @@ gatsby-plugin-catch-links@^2.1.2:
53865393
"@babel/runtime" "^7.0.0"
53875394
escape-string-regexp "^1.0.5"
53885395

5389-
gatsby-plugin-google-analytics@^2.1.4:
5390-
version "2.1.4"
5391-
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-2.1.4.tgz#f0b64900e125cef03e930332c45063ece8263206"
5392-
integrity sha512-TyCazAUVMfMy6U/dHtXYLg9FTS7PtOBrRZkpp0Pdqe2M9qA10xG54JZpjJcLGUkZr5oeZPjNAvoiVyatrTcWiw==
5396+
gatsby-plugin-google-tagmanager@^2.1.9:
5397+
version "2.1.9"
5398+
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-tagmanager/-/gatsby-plugin-google-tagmanager-2.1.9.tgz#4b97835e382ab6caa733949f6446c958648085d6"
5399+
integrity sha512-OAhHv8ovMw/bqKmsZSk2xna1WTfhihvhCghiuBvseuR/nEO5Jjlsr+1ZJ7SrGdGCXDzjc1l+NC2+iqX+dbCzmA==
53935400
dependencies:
5394-
"@babel/runtime" "^7.0.0"
5401+
"@babel/runtime" "^7.6.0"
53955402

53965403
gatsby-plugin-manifest@^2.0.17:
53975404
version "2.1.1"

0 commit comments

Comments
 (0)