RUM community plugins

A personal community project under @kyletaylored, MIT licensed.Not provided or supported by Datadog.

Business context for Datadog RUM, without custom code

The Browser RUM SDK collects sessions, views, errors and long tasks on its own. Who the shopper is, which account they belong to and what was in the cart do not come for free. These plugins read the platform’s own events and turn them into RUM context and custom actions, so order count and revenue become Datadog metrics without writing a line of tracking code.

Three steps

  1. Keep your existing RUM init. Plugins never call init themselves, so your application ID, sampling and privacy settings stay in charge.
  2. Add a plugin to plugins: [...]. Consent adapters go first, so nothing is collected before the visitor accepts.
    import { datadogRum } from '@datadog/browser-rum'
    import { oneTrustPlugin } from '@kyletaylored/datadog-rum-plugin-onetrust'
    import { wooCommercePlugin } from '@kyletaylored/datadog-rum-plugin-woocommerce'
    
    datadogRum.init({
      applicationId, clientToken, site, service, env, version,
      plugins: [
        oneTrustPlugin({ category: 'C0002' }),
        wooCommercePlugin({ identifyUsers: true }),
      ],
    })
  3. Import the asset pack. 15 actions across 4 families feed one dashboard and monitor set that works on every platform.

How it works

The adapter is the only platform-specific part. Everything below it is shared: order dedupe, the consent gate, the PII and payment-data filter, size caps and the debug log all live in the core, so a new adapter inherits them without reimplementing any of it.

Platform event source        Shopify Web Pixels · WooCommerce DOM events · OneTrust · Auth0 · …
        ↓
Platform adapter             one package per platform; maps events onto the shared schema
        ↓
Shared core                  dedupe · consent gate · PII and payment filter · size caps · debug log
        ↓
RUM SDK public API           setUser / setAccount · setGlobalContextProperty · addAction
        ↓
Datadog                      RUM Explorer, Session Replay, generated metrics, dashboard, monitors

Plugin families

Commerce

Cart, checkout and order events as RUM custom actions, so revenue lands next to errors and slow views.

2 available

Consent

Hold RUM until the visitor accepts analytics, read from the site’s own consent manager.

1 available

Identity

setUser and setAccount from the auth provider the app already runs.

0 available

Featured plugins

OneTrust

Holds Datadog RUM until the visitor accepts OneTrust's analytics category, then reports the accepted categories as session context.

Maintainerconsentv0.1.0

Shopify

Checkout events, order value and customer identity from Shopify Web Pixels. Composes with the official @datadog/browser-rum-shopify plugin rather than replacing it.

Maintainercommercev0.1.0

WooCommerce

Cart, checkout and order events from WooCommerce's own storefront DOM events, plus order data printed on the order-received page.

Maintainercommercev0.1.0

Browse all plugins →

What it will not do