Valhalla

Take a deep dive into our latest launch, the Valhalla Content Hub!

ContactSign Up for Free
Community Plugin
View plugin on GitHub

gatsby-plugin-cloudflare-web-analytics

Add Cloudflare Web Analytics to your Gatsby site.

Not affiliated with or supported by Cloudflare.

Install

To install, run npm i gatsby-plugin-cloudflare-web-analytics in your project directory.

Config

module.exports = {
  plugins: [
    // Add to your gatsby-config.js file.
    {
      resolve: `gatsby-plugin-cloudflare-web-analytics`,
      options: {
        // You need to provide your site token. You get this from the Cloudflare dashboard
        token: YOUR_CF_TOKEN,
         // You can add or overwrite attributes of the analytics script tag (optional)
        attributes: [
          {
            name: ATTRIBUTE_NAME,
            value: ATTRIBUTE_VALUE,
          }
        ],
      },
    },
  ],
}

License

This project is licensed under the BSD 3 Clause license.

© 2022 Gatsby, Inc.