Easily add Umami to your Gatsby site.
npm install --save gatsby-plugin-umami
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-plugin-umami`,
options: {
websiteId: "UMAMI_WEBSITE_ID",
srcUrl: "https://umami.example.com/script.js",
includeInDevelopment: false,
autoTrack: true,
respectDoNotTrack: true,
dataCache: false,
dataDomains: "example.com,example2.com",
},
},
];
websiteId
- Required. The website id of your umami sitesrcUrl
- Required. The url to the hostedscript.js
includeInDevelopment
- Optional. Defaults tofalse
autoTrack
- Optional. Enables umami auto track feature. Defaults totrue
respectDoNotTrack
- Optional. Enables umami respect Do Not Track feature. Defaults totrue
dataCache
- Optional. Improves performance. Defaults tofalse
dataDomains
- Optional. Allows tracking only on the specified domains. No default.
Thanks goes to these wonderful people (emoji key):
William Weiss 💻 |
Matt Banner 🐛 |
Florian Kapfenberger 💬 📖 👀 💻 🔧 |
This project follows the all-contributors specification. Contributions of any kind welcome!