{"_id":"@anvilco/gatsby-plugin-segment-js","_rev":"11-13c0e4ee710a13b31a54d3f805d77dd1","name":"@anvilco/gatsby-plugin-segment-js","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@anvilco/gatsby-plugin-segment-js","version":"0.0.1","keywords":["segment analytics","segment","segment javascript","analytics.js","gatsby","gatsby-plugin"],"author":{"name":"benjamin hoffman","email":"6520022+benjaminhoffman@users.noreply.github.com"},"license":"MIT","_id":"@anvilco/gatsby-plugin-segment-js@0.0.1","maintainers":[{"name":"benogle","email":"ogle.ben@gmail.com"},{"name":"anvilbot","email":"services@useanvil.com"},{"name":"ralbayaty","email":"richard@useanvil.com"},{"name":"newhouse","email":"c.newhouse@gmail.com"},{"name":"winggo","email":"winggo.tse@gmail.com"},{"name":"fostimus","email":"derekfoster94@gmail.com"}],"homepage":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js#readme","bugs":{"url":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js/issues"},"dist":{"shasum":"1f051737cd459528081b5fe738031d40bded77eb","tarball":"https://registry.npmjs.org/@anvilco/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-0.0.1.tgz","fileCount":10,"integrity":"sha512-ykpIQATV6bsBc9+7airN3J2udRUEErUaeVuZgPaE5B6Mvd9NaY4GxO03I1cpQaAbk2QIN6LdQEWNbAEemPvHvQ==","signatures":[{"sig":"MEUCIQD7jVKIlkADemxbeksQV/nmbOsxiBqzqP+0VexhuJ8SgQIgYFdI05/krcP26eviNS8o0OpoB9teMO1cxk42HcP2noA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":176164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXLvCRA9TVsSAnZWagAAHb0QAIcNmwP/pCYB5li26fnH\ngOxRbIeyC920R8yppZNluzdrLmgGqb+JeCn/UurQqAxZvUeeWegzCQBwZBSo\nBNtMfa54pnGtKnf3DC+WyPTJvlZUN7V7lGoEXlO4Q1bOm2Yf2ABmzYgPO+Nq\nXROliQ1UoqeGNJXVUf2A0PeCzSZtZFE5upZQivozMMMmk6GSZYPxZwlkeKM0\nChD0AQCC3oldVnI23kQXcIGYVWTwFwjQMNzz3jjZDo+IHRFWqYzh/8uTyZDv\nx909rV0DvwZv5of0rYuF6jMT1pi+O0Y6CJfKoGVF4ydB1eRxezbjowQbquGX\nPQdJBNgmkAMT1xGQzIzoIEYOFYL2VAyQF7LdiDkg0sSL7KKDM9fXFY9lj6Yx\ne6ti6OHrkl0XGICDCF2s3kWrG69V73ZUM5brNCfrl/psHqs2ENX2PxXMKIY9\nVNkbu2hlSwe/9ucu4UEn7yZIyaqBpCn/uQElnDgvkEnJGzGFK72yvgiXoGQx\nvCRzzGb+hK0L7ogEfg5hOnUl15Y7SpHheQew5jsqMY7nkZXTgoiQ38A35zZQ\nAPHFIM6NHcaVGL2n2l92nJtOa7beSu0Tx+oyltVPZqwPiGvI6HGm9LZrbVHz\nE9QeN3/O00QL2SnULMekS3hUv3WTataF1mPz0QV9UeNREx4GjozFKf6SzHdq\n6blU\r\n=9xyn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"gatsby-ssr.js","scripts":{"build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore __tests__"},"_npmUser":{"name":"newhouse","email":"c.newhouse@gmail.com"},"repository":{"url":"git@github.com:benjaminhoffman/gatsby-plugin-segment-js.git","type":"git"},"description":"Easily add Segment JS snippet to your website","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Benjamin Hoffman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.32.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint-plugin-react":"^7.24.0"},"peerDependencies":{"gatsby":"^3.0.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-segment-js_0.0.1_1629319918858_0.027155362660996385","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@anvilco/gatsby-plugin-segment-js","version":"0.0.2","keywords":["segment analytics","segment","segment javascript","analytics.js","gatsby","gatsby-plugin"],"author":{"name":"benjamin hoffman","email":"6520022+benjaminhoffman@users.noreply.github.com"},"license":"MIT","_id":"@anvilco/gatsby-plugin-segment-js@0.0.2","maintainers":[{"name":"benogle","email":"ogle.ben@gmail.com"},{"name":"anvilbot","email":"services@useanvil.com"},{"name":"ralbayaty","email":"richard@useanvil.com"},{"name":"newhouse","email":"c.newhouse@gmail.com"},{"name":"winggo","email":"winggo.tse@gmail.com"},{"name":"fostimus","email":"derekfoster94@gmail.com"}],"homepage":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js#readme","bugs":{"url":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js/issues"},"dist":{"shasum":"c8d85afbe7d98003e04283b61c407de037f9de18","tarball":"https://registry.npmjs.org/@anvilco/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-0.0.2.tgz","fileCount":10,"integrity":"sha512-TklpQ66dXrbSseYN/e4d0y305LRYWHnmD7VuHLn3yAPp3r0JrNZZbH1ZAsYEkDVCnZ01BzmxHjsQin7lnGpc1A==","signatures":[{"sig":"MEYCIQCZqh02dQa0FmS3ACVfKOTQc4LWicceUqxuOgeKup7yBwIhAO+TLTDbufQ+2PWWv+mls46fHL11vONCF4ud6l6a4m/F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":176421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHXz7CRA9TVsSAnZWagAAwDEP/0Z98XoN9RcUcmuQsYjt\no/F/6VmaFYleIzyKjxZUjJMVfIaQqFXbGGPWz4r9xZsxQJRXaZbj3k+x7q7T\nBZ3qxVijSDF2WeswTaeS2L2v29An6t5c+UdAqvVt68CoaGAUFz3K5mtfvbwa\nzKvplaHOjsydnZVx6kDnTiF+M8XpDkvi1UT8jr4yYg9KdJIpPwMsoaf2vngz\nkKtPww/EmUb0+QgOA3plODCaU07LUx2Xer5HWXFhzlDioMcat09HXu1xQ8mA\nEow1PhqqgYJsm/G5PnyUSFrnfstuvFBQmdigobFZFoDTgtc4uuw91B0h9atS\n7f86+ZxJT09CAo3JX97Ggq1z9OaSEDmhHCKRK9BKAFAFZJvsQBYYF4wC5Ng2\nIE/hjRfEgEAc0G4xtndL1nNfGpbVW6BjdvqtQ4mgWLw2/PmDKnqVapBK5nJu\nQv5iP3rJ0IZ0HceTqetk7jIOgLXQh40JnRDMwJHQhQ51NzpHEVqeFbiU29aj\ncZQp13r0C/7qGTQ0reTZTqF8URp3dteLiIPjMHVgGnI5tkNNkJTTyILYxkrL\nFsH1bcrVFn4KcAoQMFtVYHLZPK16/1DkmQe1C/3W9FwzrORNXakq1tEO+A1S\ni1FvUYTF/uRd3e7yC6eQ3GVJaGPyw/VGwzR0oQmCot9IL7VRToJiqvTXSyQi\nmBFn\r\n=0WAa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"gatsby-ssr.js","scripts":{"build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore __tests__","prepare":"yarn build"},"_npmUser":{"name":"newhouse","email":"c.newhouse@gmail.com"},"repository":{"url":"git@github.com:benjaminhoffman/gatsby-plugin-segment-js.git","type":"git"},"description":"Easily add Segment JS snippet to your website","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Benjamin Hoffman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.32.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint-plugin-react":"^7.24.0"},"peerDependencies":{"gatsby":"^3.0.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-segment-js_0.0.2_1629322490961_0.09475306950200846","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@anvilco/gatsby-plugin-segment-js","version":"0.0.4","keywords":["segment analytics","segment","segment javascript","analytics.js","gatsby","gatsby-plugin"],"author":{"name":"benjamin hoffman","email":"6520022+benjaminhoffman@users.noreply.github.com"},"license":"MIT","_id":"@anvilco/gatsby-plugin-segment-js@0.0.4","maintainers":[{"name":"benogle","email":"ogle.ben@gmail.com"},{"name":"anvilbot","email":"services@useanvil.com"},{"name":"ralbayaty","email":"richard@useanvil.com"},{"name":"newhouse","email":"c.newhouse@gmail.com"},{"name":"winggo","email":"winggo.tse@gmail.com"},{"name":"fostimus","email":"derekfoster94@gmail.com"}],"homepage":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js#readme","bugs":{"url":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js/issues"},"dist":{"shasum":"911432ed74090b390bfb54cb92f54b9548d5ae19","tarball":"https://registry.npmjs.org/@anvilco/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-0.0.4.tgz","fileCount":8,"integrity":"sha512-yoErHltIlBmqC90x88fjmyZvNHHDTJzO9iRAqzEuQSBLWxjHU3AGtHheP/Be52tMTTDe4f13d1dcQAAqtPgfkw==","signatures":[{"sig":"MEUCIQDDDWvFUJ9MXwaYMxfW1r6V2eiTb5726UsFnOhSDWE2vAIgCoUw+Bp4y+nRv21YZCIIjy86emTSvA/Xks1xOa/h5rs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHl6qCRA9TVsSAnZWagAAxjgP/iiNIl8+XP2LeHyus/Jg\nR0NTKo+P3kWXAXkedkidD11YRd0g/qcwTKDXTS4yVjyMtpsa2FGuz5KpQ73k\ndKyO7DcjmrPGJPlUbqebJFjAJ95ZmJW1gvzXBWSXSWE4l/JVPgTqhWWPvijV\nPxHDNQcU1vZ2CQOinRbZZ7QDlrvsYZ5YGoAQy2Y6LEEG4HT7bJmzuinDxOzc\nPTahg5s6mQILRNU54hinPPYhd+6ITiqvoMGYEfFwzVVkPaqdAWEd+RrfGdAR\nIZTa7iEcb7yOCAYrXOGiYbb4g3nfHoDygqLC8OIxg3PxCfS2LzeqdJmPKuA/\nE0D5kHItRYfTNS04Ei0fNOzDitFEqCciTAWp1F4EWv17lpNk6nNvT4WdKk5J\n4ZiFxOASJhj6pwqlXF2qqR27xf5/KEgEAiZUBAvaF6FcgrRPfN7n/8SbjDGY\nGWM0E56oriFpIC8SScgBB90QJDZmNu4dg8Tkb6NkJRVFSvMGHb0oNBd+hpTY\nfhDSJ+JkBbjHPywS2rER+Q/87kzncTnbnmzha8+fCrN2vr909s1pKkRLyGZQ\naVE9hW/3eHcW7d/WyGAyGqRupPqmdtxL/+oY+pNechXTMqipRNYjUR6i/zW3\nE7Ato+4Q3qkQyQrBgaH8JuWIqflosDvLEzTnKaxkmYTV0tAbSniyv+UMx0/n\nfmC4\r\n=caJ0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/gatsby-ssr.js","scripts":{"build":"babel src --out-dir dist --ignore __tests__","watch":"babel -w src --out-dir dist --ignore __tests__","prepare":"yarn build"},"_npmUser":{"name":"newhouse","email":"c.newhouse@gmail.com"},"repository":{"url":"git@github.com:benjaminhoffman/gatsby-plugin-segment-js.git","type":"git"},"description":"Easily add Segment JS snippet to your website","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Benjamin Hoffman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.32.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint-plugin-react":"^7.24.0"},"peerDependencies":{"gatsby":"^3.0.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-segment-js_0.0.4_1629380266090_0.23031729429498116","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@anvilco/gatsby-plugin-segment-js","version":"0.0.5","keywords":["segment analytics","segment","segment javascript","analytics.js","gatsby","gatsby-plugin"],"author":{"name":"benjamin hoffman","email":"6520022+benjaminhoffman@users.noreply.github.com"},"license":"MIT","_id":"@anvilco/gatsby-plugin-segment-js@0.0.5","maintainers":[{"name":"benogle","email":"ogle.ben@gmail.com"},{"name":"anvilbot","email":"services@useanvil.com"},{"name":"ralbayaty","email":"richard@useanvil.com"},{"name":"newhouse","email":"c.newhouse@gmail.com"},{"name":"winggo","email":"winggo.tse@gmail.com"},{"name":"fostimus","email":"derekfoster94@gmail.com"}],"homepage":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js#readme","bugs":{"url":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js/issues"},"dist":{"shasum":"9c88eb0be667adca23dfc5b4999743bfbed8634a","tarball":"https://registry.npmjs.org/@anvilco/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-0.0.5.tgz","fileCount":8,"integrity":"sha512-vgCDYc8yzRvPEHsXh4I2KZd9ZlXQaaNxkIDCl0LIZ5qMXt0Vjc5ryxUd7pWCpRzuQyM8U2EIWl18/YFTHZtOoA==","signatures":[{"sig":"MEUCIDIm+92KP3Zt6sdYmw7HMLBcmjdBf/rw9N/SKkK/69tDAiEA1C8nJuZKPTULkiqS1NTSA3mqbhR4MbnzTGdecStfK5E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHoSJCRA9TVsSAnZWagAA9DwP/jOfsojrDOo4L9g/yyBQ\nRvv62n3oEdLNkASzRYwZ92jKPBcVqWxF+5mxL1dMnujdk4a5OMVsqf6cg9Da\n7Tolbkx0Pc1Z9It82zzQd84rf/k8VTnbHK5trCOYpJ4FH1bfb3+QAD3HUdTX\nebXxeKHTSgrF5kG2lIN0R2YPJINyjICHxID4yx25/XTyaS5L0/VwJksbzbO6\nF7zEH+Qb2sUEPFeTzpuXcp6xT22xPRuFVfSFS4wu2L9Sio3sLq+42QRcKwUl\nMfqQHFuoZ8BnpsLHvxJAQzdjs8bzP76lnCEij2m/0ywlGwOg+N8+U7+g8+la\ngZQYZYB8amWcfCoMH0lK+w2y96EKgP/ItRP31Cl6W7e1idrPuukeo8HHGxWo\nVHSk8J3Xt25+rRmZxi5VogMLhpmY/aSH/xUvLD05CqXmN64IA2pugC3ZJoqV\n7anbZVxAP8gs7XpVhxbhB4MuTHXy7BjafF95iTzdt3X5shbxpNsy3PkjBq5g\n+6Cw0oFxINO6zjdE5a1/r9fXR5RBVd8LKSlLKgA5vARi5ufcgHbLsnPbHQ0O\nmATZD1f1cv5rbtoIYVBASb7+YP/zMRZa94unsI+LHppBzm2RwfHD78r6A0IF\nsJCvPYu7YHmR0IPrk8iUR7vMImjrx+djBLHzcwmRMip3pwKRyjpRxAESNbBD\n2BhF\r\n=VelY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"gatsby-ssr.js","scripts":{"build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore __tests__","prepare":"yarn build"},"_npmUser":{"name":"newhouse","email":"c.newhouse@gmail.com"},"repository":{"url":"git@github.com:benjaminhoffman/gatsby-plugin-segment-js.git","type":"git"},"description":"Easily add Segment JS snippet to your website","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Benjamin Hoffman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.32.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint-plugin-react":"^7.24.0"},"peerDependencies":{"gatsby":"^3.0.0 || ^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-segment-js_0.0.5_1629389961109_0.2454430410536872","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-08-18T20:51:58.858Z","modified":"2025-11-12T22:03:16.035Z","0.0.1":"2021-08-18T20:51:59.043Z","0.0.2":"2021-08-18T21:34:51.093Z","0.0.4":"2021-08-19T13:37:46.470Z","0.0.5":"2021-08-19T16:19:21.241Z"},"bugs":{"url":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js/issues"},"author":{"name":"benjamin hoffman","email":"6520022+benjaminhoffman@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/benjaminhoffman/gatsby-plugin-segment-js#readme","keywords":["segment analytics","segment","segment javascript","analytics.js","gatsby","gatsby-plugin"],"repository":{"url":"git@github.com:benjaminhoffman/gatsby-plugin-segment-js.git","type":"git"},"description":"Easily add Segment JS snippet to your website","maintainers":[{"email":"services@useanvil.com","name":"anvilbot"},{"email":"derekfoster94@gmail.com","name":"fostimus"},{"email":"manggit@gmail.com","name":"manggit"},{"email":"manggit@useanvil.com","name":"manggit_anvil"}],"readme":"# gatsby-plugin-segment-js\n\nA lightweight & feature-rich Gatsby plugin to easily add [Segment JS snippet](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) to your site.\n\n## We need your help! 🙏🏽\nWe're looking for active contributors to this repo!  If you're interested, simply open an issue or PR of your own and indicate that you'd like to help.  Check out our open issues and PRs.  We also need to beef up testing.  Contributors get to:\n- manage versioning and deploys by publishing new versions to NPM\n- determine which features get launched by merging pull requests\n- oversee the community through commenting on and managing pull requests and issues\n\n⚜️ Being an active contributor is great for the community and your engineering resume.⚜️\n\n## Features\n\nPacked with features:\n\n- use multiple write keys (one for prod env, another optional one for dev)\n- disable page view tracking (just in case you want to add it later manually)\n- up to date (Segment snippet 4.1.0)\n\n## Install\n\n- NPM: `$ npm install --save gatsby-plugin-segment-js`\n- YARN: `$ yarn add gatsby-plugin-segment-js`\n\n## How to use\n\n### Setup\n\nIn your gatsby-config.js file:\n\n```javascript\nplugins: [\n  {\n    resolve: `gatsby-plugin-segment-js`,\n    options: {\n      // your segment write key for your production environment\n      // when process.env.NODE_ENV === 'production'\n      // required; non-empty string\n      prodKey: 'SEGMENT_PRODUCTION_WRITE_KEY',\n\n      // if you have a development env for your segment account, paste that key here\n      // when process.env.NODE_ENV === 'development'\n      // optional; non-empty string\n      devKey: 'SEGMENT_DEV_WRITE_KEY',\n\n      // boolean (defaults to false) on whether you want\n      // to include analytics.page() automatically\n      // if false, see below on how to track pageviews manually\n      trackPage: false,\n\n      // number (defaults to 50); time to wait after a route update before it should\n      // track the page change, to implement this, make sure your `trackPage` property is set to `true`\n      trackPageDelay: 50,\n\n      // If you need to proxy events through a custom endpoint,\n      // add a `host` property (defaults to https://cdn.segment.io)\n      // Segment docs:\n      //   - https://segment.com/docs/connections/sources/custom-domains\n      //   - https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#proxy\n      host: 'https://override-segment-endpoint',\n\n      // boolean (defaults to false); whether to delay load Segment\n      // ADVANCED FEATURE: only use if you leverage client-side routing (ie, Gatsby <Link>)\n      // This feature will force Segment to load _after_ either a page routing change\n      // or user scroll, whichever comes first. This delay time is controlled by\n      // `delayLoadTime` setting. This feature is used to help improve your website's\n      // TTI (for SEO, UX, etc).  See links below for more info.\n      // NOTE: But if you are using server-side routing and enable this feature,\n      // Segment will never load (because although client-side routing does not do\n      // a full page refresh, server-side routing does, thereby preventing Segment\n      // from ever loading).\n      // See here for more context:\n      // GIF: https://github.com/benjaminhoffman/gatsby-plugin-segment-js/pull/19#issuecomment-559569483\n      // TTI: https://github.com/GoogleChrome/lighthouse/blob/master/docs/scoring.md#performance\n      // Problem/solution: https://marketingexamples.com/seo/performance\n      delayLoad: false,\n\n      // number (default to 1000); time to wait after scroll or route change\n      // To be used when `delayLoad` is set to `true`\n      delayLoadTime: 1000,\n\n      // Whether to completely skip calling `analytics.load({writeKey})`.\n      // ADVANCED FEATURE: only use if you are calling `analytics.load({writeKey})` manually\n      // elsewhere in your code or are using a library\n      // like: https://github.com/segmentio/consent-manager that will call it for you.\n      // Useful for only loading the tracking script once a user has opted in to being tracked, for example.\n      manualLoad: false,\n\n      // This package will use a default version of Segment's code snippet, but\n      // if you'd like to include your own you can do so here. This is useful if\n      // the version this package uses is different than the one you'd like to\n      // use...or you need to do something custom.\n      // While you should NOT use a back-ticked template string here, the string\n      // will be evaluated as template literal with the following variables\n      // available to it:\n      //    - `writeKey`: The appropriate value from the `prodKey` and `devKey`\n      //      options, based on the `NODE_ENV`\n      //    - any of the other options passed here\n      // \n      // NOTES: \n      // - If you provide a custom snippet, an immediate call to\n      //   `analytics.load()` and/or `analytics.page()` will not be added by\n      //   this plugin. You can - of course - add them yourself to your snippet.\n      // - If your custom snippet does not include a call to `analytics.load()`\n      //   then you must either:\n      //   1. Manually load it and set the `manualLoad` option here to `true`\n      //   2. Use the `delayLoad` option here\n      customSnippet: '!function(){var analytics=window.analytics||[];...;analytics.load(\"${writeKey}\");analytics.page();}}();'\n    }\n  }\n];\n```\n\n### Track Events\n\nIf you want to track events, you simply invoke Segment as normal in your React components — (`window.analytics.track('Event Name', {...})` — and you should see the events within your Segment debugger! For example, if you wanted to track events on a click, it may look something like this:\n\n```javascript\nclass IndexPage extends React.Component {\n    ...\n    _handleClick() {\n        window.analytics.track(\"Track Event Fired\", {\n            userId: user.id,\n            gender: 'male',\n            age: 33,\n        });\n    }\n    render() {\n        return (\n            <p>\n                <Link onClick={this._handleClick} to=\"/\">\n                    Click here\n                </Link>{\" \"}\n                to see a track event\n            </p>\n        );\n    }\n}\n```\n\n### Track Pageviews\n\nIf you want to track pageviews automatically, set `trackPage` to `true` in your `gatsby-config.js` file. What we mean by _\"automatically\"_ is that whenever there is a route change, we leverage Gatsby's `onRouteUpdate` API in the `gatsby-browser.js` file ([link](https://www.gatsbyjs.org/docs/browser-apis/#onRouteUpdate)) to invoke `window.analytics.page()` on each route change. But if you want to pass in properties along with the pageview call (ie, it's common to see folks pass in some user or account data with each page call), then you'll have to set `trackPage: false` and call it yourself in your `gatsby-browser.js` file, like this:\n\n```javascript\n// gatsby-browser.js\nexports.onRouteUpdate = () => {\n  window.analytics && window.analytics.page();\n};\n```\n","readmeFilename":"README.md"}