Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-plugin-umami

npm

Gatsby plugin to add Google Analytics support to your site leveraging Google’s gtag.js library.

The main difference with the official Gatsby plugins is that this one doesn’t use cookies to track visitors.

Usage

plugins: [
  {
    resolve: '@marcnuri/gatsby-plugin-umami',
    options: {
      src: 'https://analytics.example.com/script.js',
      dataWebsiteId: 'c785dabf-e60d-422c-a2a5-fa737bdf1443'
    }
  },
]
Option Description
src* URL where the script should be downloaded from.
dataWebsiteId* The ID for your website. Can be retrieved from the Umami dashboard.
dataHostUrl By default, Umami will send data to wherever the script is located. You can override this to send data to another location.
dataDomains If you want the tracker to only run on specific domains, you can add them to your tracker script. This is a comma delimited list of domain names. Helps if you are working in a staging/development environment.

* Required fields

© 2024 Gatsby, Inc.