Gatsby plugin to add Datadog Real User Monitoring (RUM) to your site.
npm install gatsby-plugin-datadog-rumGatsby plugin to add Datadog Real User Monitoring (RUM) to your Gatsby site.
Learn more about Datadog here.
npm install --save gatsby-plugin-datadog-rum
``javascript`
// 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.
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.