diff --git a/lib/instrumenter/src/instrumenter.ts b/lib/instrumenter/src/instrumenter.ts index 86b5f64cc4b1..13b69a73851f 100644 --- a/lib/instrumenter/src/instrumenter.ts +++ b/lib/instrumenter/src/instrumenter.ts @@ -584,8 +584,10 @@ export function instrument>( options: Options = {} ): TObj { try { - // Don't do any instrumentation if not loaded in an iframe. - if (global.window.parent === global.window) return obj; + const params = new URLSearchParams(global.window.location.search); + + // Don't do any instrumentation if not loaded in an iframe and it's not running in a capture. + if (global.window.parent === global.window && !params.get('interactions')) return obj; // Only create an instance if we don't have one (singleton) yet. if (!global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__) {