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
- Keep your existing RUM init. Plugins never call
initthemselves, so your application ID, sampling and privacy settings stay in charge. - 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 }), ], }) - 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, monitorsPlugin families
Commerce
Cart, checkout and order events as RUM custom actions, so revenue lands next to errors and slow views.
Consent
Hold RUM until the visitor accepts analytics, read from the site’s own consent manager.
Identity
setUser and setAccount from the auth provider the app already runs.
Featured plugins
OneTrust
Holds Datadog RUM until the visitor accepts OneTrust's analytics category, then reports the accepted categories as session context.
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.
WooCommerce
Cart, checkout and order events from WooCommerce's own storefront DOM events, plus order data printed on the order-received page.
What it will not do
- No payment data, ever. Adapters read platform event payloads, never DOM inputs, and card fields are stripped in the core even if a payload carries them.
- No PII by default.
usr.idis the platform customer ID; email and name need an explicit opt-in. Search terms are sent as a length, never the text. - No claim to replace order reporting. These numbers come from the browser and undercount. They show trends and anomalies next to performance and errors; the platform’s admin report stays the source of truth.