See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Sign Up for Free
Community Plugin
View plugin on GitHub

gatsby-plugin-datadog-rum

Gatsby plugin to add Datadog Real User Monitoring (RUM) to your Gatsby site.

Learn more about Datadog here.

Install

npm install --save gatsby-plugin-datadog-rum

How to setup

// In your gatsby-config.js
plugins: [
  {
    resolve: "gatsby-plugin-datadog-rum",
    options: {
      applicationId: 'YOUR_APP_ID',
      clientToken: 'YOUR_CLIENT_TOKEN',
      site: 'datadoghq.com',
      sampleRate: 100,
      enabled: !IS_DEV,
    }
  }
];

Options available are same as the Datadog initialization parameters. Additionally, the parameter enabled (boolean) is available to easily turn the plugin integration on/off.

How to use

RUM data will automatically be collected.

datadogRum is available on the global window object, so you can use it for manual error collection and custom user actions, etc.

© 2022 Gatsby, Inc.