{"name":"gatsby-plugin-google-analytics","description":"Gatsby plugin to add google analytics onto a site","version":"1.1.0-alpha.20252dc3","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dependencies":{"@babel/runtime":"^7.0.0-beta.42"},"devDependencies":{"@babel/cli":"^7.0.0-beta.42","@babel/core":"^7.0.0-beta.42","cross-env":"^5.1.4"},"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics#readme","keywords":["gatsby","gatsby-plugin","google analytics"],"license":"MIT","main":"index.js","peerDependencies":{"gatsby":">1.0.0 || >2.0.0-alpha"},"repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics"},"scripts":{"build":"babel src --out-dir . --ignore __tests__","prepublish":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore __tests__"},"readmeFilename":"README.md","readme":"# gatsby-plugin-google-analytics\n\nEasily add Google Analytics to your Gatsby site.\n\n## Install\n\n`npm install --save gatsby-plugin-google-analytics`\n\n## How to use\n\n```javascript\n// In your gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-plugin-google-analytics`,\n    options: {\n      trackingId: \"YOUR_GOOGLE_ANALYTICS_TRACKING_ID\",\n      // Puts tracking script in the head instead of the body\n      head: false,\n      // Setting this parameter is optional\n      anonymize: true,\n    },\n  },\n];\n```\n\n## The \"anonymize\" option\n\nSome countries (such as Germany) require you to use the\n[\\_anonymizeIP](https://support.google.com/analytics/answer/2763052) function for\nGoogle Analytics. Otherwise you are not allowed to use it. The option adds two\nblocks to the code:\n\n```javascript\nfunction gaOptout(){document.cookie=disableStr+'=true; expires=Thu, 31 Dec 2099 23:59:59 UTC;path=/',window[disableStr]=!0}var gaProperty='UA-XXXXXXXX-X',disableStr='ga-disable-'+gaProperty;document.cookie.indexOf(disableStr+'=true')>-1&&(window[disableStr]=!0);\n\n...\n\nga('set', 'anonymizeIp', 1);\n```\n\nIf your visitors should be able to set an Opt-Out-Cookie (No future tracking)\nyou can set a link e.g. in your imprint as follows:\n\n`<a href=\"javascript:gaOptout();\">Deactive Google Analytics</a>`\n","_id":"gatsby-plugin-google-analytics@1.1.0-alpha.20252dc3","dist":{"shasum":"05b1f92192ac65a865a24759da1c6e128938571a","tarball":"http://registry-npm.ywwl.com/gatsby-plugin-google-analytics/download/gatsby-plugin-google-analytics-1.1.0-alpha.20252dc3.tgz","fileCount":7,"unpackedSize":4243,"integrity":"sha512-GSVGkb/0UU5ntJOmFUvguuoG0KRVt5cnaB8AaGu8XbQokMlX4MNKGAdW6Yb7GHNeCzbrEEofJMxxA+Q7qr7zUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmKjngp3RNjACoZQFmkvsa8WgZlR4+a1A2cvZm58Pv4AiBByzPp68Ou6t9Mgf3vihyn//e6/5MkiD3K7EgwiyUvow=="}],"size":2128,"noattachment":false,"key":"/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-1.1.0-alpha.20252dc3.tgz"},"maintainers":[{"email":"mathews.kyle@gmail.com","name":"kylemathews"},{"email":"monastic.panic@gmail.com","name":"monastic.panic"}],"_npmUser":{"name":"kylemathews","email":"mathews.kyle@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-google-analytics_1.1.0-alpha.20252dc3_1522291430657_0.5090250965211898"},"_hasShrinkwrap":false,"publish_time":1522291430734,"_cnpm_publish_time":1522291430734,"dist-tags":{"alpha-9689ff":"4.23.0-alpha-9689ff.25","alpha-a5-peer":"4.23.0-alpha-a5-peer.70","alpha-qe-sm":"3.14.0-alpha-qe-sm.46","alpha-transformer-json":"4.14.0-alpha-transformer-json.26","alpha-ts-jit":"4.6.0-alpha-ts-jit.60","alpha-v5":"5.0.0-alpha-v5.d20221012t101120.57","dev-ssr-2":"2.3.14-dev-ssr-2.390","drupal-proxyurl":"5.0.0-alpha-drupal-proxyurl.14","drupal-self-reference":"4.18.0-alpha-drupal-self-reference.18","image-helpers":"2.6.0-image-helpers.58","image-service":"4.8.0-alpha-image-service.24","latest":"5.16.0","latest-v3":"3.15.0","latest-v4":"4.25.0","next":"5.17.0-next.0","otp-test":"2.1.12-otp-test.31","preview-gh-api":"4.23.0-alpha-preview-gh-api.26","reach-router":"3.0.0-reach-router.143","react19":"5.18.0-react19.1","unifiedroutes":"2.2.4-unifiedroutes.76","v3rc":"3.0.0-v3rc.0","wp-image-cdn-auth":"4.15.0-alpha-wp-image-cdn-auth.48"}}