Skip to main content
January 19, 2026
v0.0.12
Added Parcel bundler compatibility with a new /background entry point for Chrome extensions.New Entry Point: /backgroundA lightweight entry point for Chrome extension background scripts:
import { HttpTransport, createBackgroundHandler } from '@composite-inc/composite-js/background';

const transport = new HttpTransport({
  apiKey: 'pk_your_api_key',
  apiHost: 'https://api.composite.com',
});

createBackgroundHandler(transport);
Why is this needed?
  • Parcel’s web worker bundling requires specific import patterns
  • The /background entry provides a minimal bundle optimized for background scripts
  • Avoids bundler compatibility issues with session recording dependencies
Exports from /background:
  • HttpTransport - HTTP transport for API communication
  • createBackgroundHandler - Background script message handler
  • MESSAGE_TYPES - Message type constants
  • Type exports: Transport, TransportConfigRequest, TransportResponse, ProjectConfig, CompositeEvent, SnapshotEvent
Internal Changes:
  • Moved compression utilities to core/utils/ (backwards compatible via re-exports)
Session recording with Parcel has limited support. Use Webpack or Rsbuild for full session recording, or disable session recording when using Parcel.
January 5, 2026
v0.0.10
Expanded session recording configuration options for greater control over privacy, performance, and recording behavior.Privacy & Masking
  • maskSelector - CSS selector for elements to mask text content
  • maskTextClass - CSS class name for elements to mask text content
  • blockSelector - CSS selector for elements to block entirely from recording
  • blockClass - CSS class name for elements to block entirely
  • ignoreSelector - CSS selector for elements to ignore (not record)
  • ignoreClass - CSS class name for elements to ignore
  • maskAllInputs - Mask all text inputs
  • maskInputOptions - Granular input masking by input type (email, tel, password, etc.)
  • maskInputFn - Custom function to mask input values
  • maskTextFn - Custom function to mask text content
Recording Features
  • recordCanvas - Record canvas elements
  • recordCrossOriginIframes - Record cross-origin iframes
  • inlineImages - Inline images as data URLs
  • collectFonts - Collect web fonts
  • inlineStylesheet - Inline stylesheets
  • recordAfter - Control when recording starts (DOMContentLoaded or load)
Sampling & Performance
  • sampling - Sampling strategy for different event types
  • checkoutEveryNth - Take a full DOM snapshot every N events
  • checkoutEveryNms - Take a full DOM snapshot every N milliseconds
  • slimDOMOptions - Reduce snapshot size by omitting scripts, comments, and meta tags
Plugins
  • enableRecordingConsoleLog - Enable console log capture
  • networkCapture - Enable network request capture with configurable options
January 2, 2026
v0.0.9
Added support for bundlers with code splitting (Webpack, Rspack, etc.) in Chrome extension content scripts.Content Script Entry PointUsing a bundler with code splitting? Import from @composite-inc/composite-js/content-script instead of @composite-inc/composite-js:
import composite from '@composite-inc/composite-js/content-script';

await composite.init({
  apiKey: 'pk_xxx',
  transport: 'chrome-extension',
  sessionRecording: true,
});
The /content-script entry point pre-bundles all extensions synchronously, avoiding ChunkLoadError issues caused by dynamic imports in content scripts.Why is this needed?
  • Chrome extension content scripts run in an “isolated world”
  • Bundlers load chunks via script tags that execute in the page’s main world
  • The two worlds can’t communicate, causing chunk loading to fail
  • This entry point includes all extensions upfront, avoiding dynamic imports
December 5, 2025
v0.0.1
Initial release of Composite Analytics SDK documentation.