{"_id":"@dnwjn/gatsby-plugin-plausible","_rev":"2-5403c6bc29b16e60f50b8d2fcb2e5448","name":"@dnwjn/gatsby-plugin-plausible","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.8":{"name":"@dnwjn/gatsby-plugin-plausible","version":"0.0.8","keywords":["gatsby","gatsby-plugin","plausible","analytics"],"author":{"url":"https://dnwjn.dev","name":"Danique Wijnalda","email":"hello@dnwjn.dev"},"license":"MIT","_id":"@dnwjn/gatsby-plugin-plausible@0.0.8","maintainers":[{"name":"dnwjn","email":"hello@dnwjn.dev"}],"contributors":[{"name":"Curtis Cummings","email":"curtis@pixelplicity.com"},{"url":"https://dnwjn.dev","name":"Danique Wijnalda","email":"hello@dnwjn.dev"}],"homepage":"https://github.com/dnwjn/gatsby-plugin-plausible#readme","bugs":{"url":"https://github.com/dnwjn/gatsby-plugin-plausible/issues"},"dist":{"shasum":"6459d215aeab3784cfcb5d086d07509ac316687e","tarball":"https://registry.npmjs.org/@dnwjn/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.8.tgz","fileCount":9,"integrity":"sha512-luk5gHKNMriEI4mDNhH8DY7msKV0sF5Bd0t9eeXhlAen44z5efvHoNRo6C14ER7kxlFl9AexbbZb7ybC80UGRA==","signatures":[{"sig":"MEUCIAsBRpbdRCG1kcJWmme4HXOn/SM5OlFA0XQ4g5kWW7bKAiEAmBrv8KIdHgv9/mkBvcSjVyVHEKpRxmzm0rLRBtD2cZg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13776},"main":"index.js","gitHead":"3fd32ebbe0f9efa1c73e9bdc281faa0cd772c0c6","scripts":{"lint":"eslint ./src/**/*.js","test":"npm run lint && jest --coverage","build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore **/__tests__","format":"prettier --write 'src/**/*.js'","version":"auto-changelog -p && git add CHANGELOG.md","bump-major":"npm version major --no-git-tag-version","bump-minor":"npm version minor --no-git-tag-version","bump-patch":"npm version patch --no-git-tag-version","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"_npmUser":{"name":"dnwjn","email":"hello@dnwjn.dev"},"repository":{"url":"git+https://github.com/dnwjn/gatsby-plugin-plausible.git","type":"git"},"_npmVersion":"10.8.2","description":"A Gatsby plugin for adding Plausible analytics to your Gatsby site.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"minimatch":"3.0.4","@babel/runtime":"^7.9.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.3.0","eslint":"^6.8.0","prettier":"^2.0.4","cross-env":"^7.0.2","@babel/cli":"^7.8.4","@babel/core":"^7.9.0","babel-eslint":"^10.1.0","@babel/runtime":"^7.9.2","auto-changelog":"^2.0.0","eslint-plugin-react":"^7.19.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","babel-preset-gatsby-package":"^0.3.1","@ianvs/prettier-plugin-sort-imports":"4.1.1"},"peerDependencies":{"react":">=16.0.0","gatsby":">=2.0.0","react-dom":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-plausible_0.0.8_1730584043477_0.5568152407567146","host":"s3://npm-registry-packages"}},"0.0.9":{"name":"@dnwjn/gatsby-plugin-plausible","version":"0.0.9","keywords":["gatsby","gatsby-plugin","plausible","analytics"],"author":{"url":"https://dnwjn.dev","name":"Danique Wijnalda","email":"hello@dnwjn.dev"},"license":"MIT","_id":"@dnwjn/gatsby-plugin-plausible@0.0.9","maintainers":[{"name":"dnwjn","email":"hello@dnwjn.dev"}],"contributors":[{"name":"Curtis Cummings","email":"curtis@pixelplicity.com"},{"url":"https://dnwjn.dev","name":"Danique Wijnalda","email":"hello@dnwjn.dev"}],"homepage":"https://github.com/dnwjn/gatsby-plugin-plausible#readme","bugs":{"url":"https://github.com/dnwjn/gatsby-plugin-plausible/issues"},"dist":{"shasum":"0a34949acd9e066b793488662f4f49c4fc76b428","tarball":"https://registry.npmjs.org/@dnwjn/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.9.tgz","fileCount":9,"integrity":"sha512-hLHgVcLwlmQzzXgTtsqog4AhSmmOBiFkchEzLmqZiktkt4AQpX6wRJeNfiMUv7073sZ6tJk6SwDt1XXlfc/HOg==","signatures":[{"sig":"MEQCIHUK4CFVQSnDNyQa5IxdPcYbzgwP1IblcrZHrJTUxAG1AiAdmmbU45cqfjco7H8f9L7Vx3PMadKARJmf07jhWLcEjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14658},"main":"index.js","gitHead":"54f2b3619a38b43cfbaddc9b406294d94d1e53d3","scripts":{"lint":"eslint ./src/**/*.js","test":"npm run lint && jest --coverage","build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore **/__tests__","format":"prettier --write 'src/**/*.js'","version":"auto-changelog -p && git add CHANGELOG.md","bump-major":"npm version major --no-git-tag-version","bump-minor":"npm version minor --no-git-tag-version","bump-patch":"npm version patch --no-git-tag-version","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"_npmUser":{"name":"dnwjn","email":"hello@dnwjn.dev"},"repository":{"url":"git+https://github.com/dnwjn/gatsby-plugin-plausible.git","type":"git"},"_npmVersion":"10.8.2","description":"A Gatsby plugin for adding Plausible analytics to your Gatsby site.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"minimatch":"3.0.4","@babel/runtime":"^7.9.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.3.0","eslint":"^6.8.0","prettier":"^2.0.4","cross-env":"^7.0.2","@babel/cli":"^7.8.4","@babel/core":"^7.9.0","babel-eslint":"^10.1.0","@babel/runtime":"^7.9.2","auto-changelog":"^2.0.0","eslint-plugin-react":"^7.19.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","babel-preset-gatsby-package":"^0.3.1","@ianvs/prettier-plugin-sort-imports":"4.1.1"},"peerDependencies":{"react":">=16.0.0","gatsby":">=2.0.0","react-dom":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-plausible_0.0.9_1730584828596_0.699420008062092","host":"s3://npm-registry-packages"}},"0.0.10":{"name":"@dnwjn/gatsby-plugin-plausible","description":"A Gatsby plugin for adding Plausible analytics to your Gatsby site.","version":"0.0.10","author":{"name":"Danique Wijnalda","email":"hello@dnwjn.dev","url":"https://dnwjn.dev"},"contributors":[{"name":"Curtis Cummings","email":"curtis@pixelplicity.com"},{"name":"Danique Wijnalda","email":"hello@dnwjn.dev","url":"https://dnwjn.dev"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dnwjn/gatsby-plugin-plausible.git"},"bugs":{"url":"https://github.com/dnwjn/gatsby-plugin-plausible/issues"},"homepage":"https://github.com/dnwjn/gatsby-plugin-plausible#readme","main":"index.js","keywords":["gatsby","gatsby-plugin","plausible","analytics"],"scripts":{"build":"babel src --out-dir . --ignore __tests__","watch":"babel -w src --out-dir . --ignore **/__tests__","prepublishOnly":"cross-env NODE_ENV=production npm run build","lint":"eslint","lint:fix":"eslint --fix","format":"prettier --write '**.js'","test":"npm run lint && jest --coverage","version":"auto-changelog -p && git add CHANGELOG.md","bump-patch":"npm version patch --no-git-tag-version","bump-minor":"npm version minor --no-git-tag-version","bump-major":"npm version major --no-git-tag-version"},"dependencies":{"@babel/plugin-transform-private-methods":"^7.25.9","@babel/runtime":"^7.26.0","minimatch":"^10.0.1"},"devDependencies":{"@babel/cli":"^7.25.9","@babel/core":"^7.26.0","@babel/eslint-parser":"^7.25.9","@babel/runtime":"^7.26.0","@eslint/eslintrc":"^3.1.0","@eslint/js":"^9.14.0","@ianvs/prettier-plugin-sort-imports":"^4.3.1","auto-changelog":"^2.5.0","babel-preset-gatsby-package":"^3.13.1","cross-env":"^7.0.3","eslint":"^9.14.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","eslint-plugin-react":"^7.37.2","globals":"^15.11.0","jest":"^29.7.0","prettier":"^3.3.3"},"peerDependencies":{"gatsby":">=2.0.0","react":">=16.0.0","react-dom":">=16.0.0"},"_id":"@dnwjn/gatsby-plugin-plausible@0.0.10","gitHead":"ddeee1db7ba9699d0f9615c2c1efdfbdf082e4c0","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-NpEEMWyCHq39dgOtY4hTTh/ogSIDFCEJP/g5oSoxf7PemUZUHQH0R9OGW0qMhmuHxYSxR1cXPF+1kjjt1IHLNQ==","shasum":"8ecf716348143778bb8dab97bb3fbeedeba738f7","tarball":"https://registry.npmjs.org/@dnwjn/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.10.tgz","fileCount":10,"unpackedSize":16325,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCp2oU1gli7AHfcxl0JivlSKBTFgyZOmyIYu7M9RmYQkwIhAKJ2XwE96upK8btZkn0l4Ve/UkGsVJ/d5+3fs/xzge4p"}]},"_npmUser":{"name":"dnwjn","email":"hello@dnwjn.dev"},"directories":{},"maintainers":[{"name":"dnwjn","email":"hello@dnwjn.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-plausible_0.0.10_1730587447887_0.4692633810586011"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-02T21:47:23.347Z","modified":"2024-11-02T22:44:08.276Z","0.0.8":"2024-11-02T21:47:23.705Z","0.0.9":"2024-11-02T22:00:28.778Z","0.0.10":"2024-11-02T22:44:08.079Z"},"bugs":{"url":"https://github.com/dnwjn/gatsby-plugin-plausible/issues"},"author":{"name":"Danique Wijnalda","email":"hello@dnwjn.dev","url":"https://dnwjn.dev"},"license":"MIT","homepage":"https://github.com/dnwjn/gatsby-plugin-plausible#readme","keywords":["gatsby","gatsby-plugin","plausible","analytics"],"repository":{"type":"git","url":"git+https://github.com/dnwjn/gatsby-plugin-plausible.git"},"description":"A Gatsby plugin for adding Plausible analytics to your Gatsby site.","contributors":[{"name":"Curtis Cummings","email":"curtis@pixelplicity.com"},{"name":"Danique Wijnalda","email":"hello@dnwjn.dev","url":"https://dnwjn.dev"}],"maintainers":[{"name":"dnwjn","email":"hello@dnwjn.dev"}],"readme":"# gatsby-plugin-plausible\n\n[![npm package](https://flat.badgen.net/npm/v/@dnwjn/gatsby-plugin-plausible)](https://www.npmjs.com/package/@dnwjn/gatsby-plugin-plausible)\n\nA Gatsby plugin for adding [Plausible](https://plausible.io/) analytics to your Gatsby site.\n\nThe plugin includes the Plausible tracking script for a configured domain. It also supports:\n\n- using a custom domain (if you are not using the cloud version of Plausible),\n- using a custom script (if you are not using the default `script.js`), and\n- excluding specific paths from recording page views.\n\n> [!NOTE]\n> This is a fork of the original [gatsby-plugin-plausible](https://github.com/pixelplicity/gatsby-plugin-plausible) plugin, which is no longer maintained (last activity in 2020).\n\n---\n\n## Table of contents\n\n- [Install](#install)\n  - [Manual](#manual)\n  - [Gatsby Recipe](#gatsby-recipe)\n- [How to use](#how-to-use)\n  - [Options](#options)\n  - [Pageview events](#pageview-events)\n  - [Triggering custom events](#triggering-custom-events)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Install\n\n### Manual\n\n1. Install the plugin:\n\n   ```bash\n   npm install --save @dnwjn/gatsby-plugin-plausible\n   ```\n\n2. Add the plugin to `gatsby-config.js`:\n\n   ```javascript\n   // gatsby-config.js\n   module.exports = {\n     plugins: [\n       {\n         resolve: '@dnwjn/gatsby-plugin-plausible',\n         options: {\n           domain: 'your-gatsby-site.tld',\n           plausibleDomain: 'your-plausible-instance.tld',\n           plausibleScript: 'script.outbound-links.js',\n           excludePaths: ['/exclude-path'],\n         },\n       },\n     ],\n   };\n   ```\n\n### Gatsby Recipe\n\nThis will install `@dnwjn/gatsby-plugin-plausible` and add a sample configuration.\n\n1. Upgrade gatsby-cli and gatsby to the latest version:\n\n   ```bash\n   npm install -g gatsby-cli@latest\n   npm install gatsby@latest\n   ```\n\n2. Run the recipe:\n\n   ```bash\n   gatsby recipes https://raw.githubusercontent.com/dnwjn/gatsby-plugin-plausible/master/gatsby-recipe-plausible.mdx\n   ```\n\n3. Edit `gatsby-config.js` and set the [options](#options) accordingly.\n\nTo read more about recipes, check out the [announcement](https://www.gatsbyjs.org/blog/2020-04-15-announcing-gatsby-recipes/).\n\n## How to use\n\n> [!NOTE]\n> By default, this plugin only generates output when running in production mode. To test your tracking code, run `gatsby build && gatsby serve`.\n\n### Options\n\n| Option                     | Explanation                                                  |\n| -------------------------- | ------------------------------------------------------------ |\n| `domain` **(required)**    | The domain configured in Plausible.                          |\n| `plausibleDomain`          | Custom domain (if not using the cloud version of Plausible). |\n| `plausibleScript`          | Custom script (if not using the default `script.js`).        |\n| `excludePaths`             | Array of paths that should not trigger page views.           |\n\n### Pageview events\n\nPageviews are sent automatically when a user changes routes, including the initial load of your site.\n\n### Triggering custom events\n\nTo track goals and conversions you have to trigger custom events first. You can do that as follows:\n\n```js\nwindow.plausible('Signup', {\n  callback: () => console.info('Sent Signup event'),\n});\n```\n\nThe event name can be anything. The second argument is an object with options. The only supported option is `callback` that is called once the event has been sent.\n\n> [!NOTE]\n> You have to configure a goal in your Plausible dashboard before custom events will show up.\n\n## Changelog\n\nFor an overview of changes, see [CHANGELOG.md](CHANGELOG.md).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n\nOriginal work copyright (c) 2020-2024 [Pixelplicity](https://github.com/pixelplicity)\n\nModified work copyright (c) 2024 [dnwjn](https://github.com/dnwjn)\n","readmeFilename":"README.md"}