Analytics
Collect consent-aware application events and deliver them through explicit browser and server boundaries.
Browser analytics
Adapt Basemarks track events with explicit property mapping; supply an application-owned transport for error reporting.
Collect consent-aware application events and deliver them through explicit browser and server boundaries.
Browser analytics
Carry stable application errors across server and client boundaries, report normalized failures, and retain framework-native recovery without leaking sensitive context.
Provider-independent reporting
The analytics adapter supports the published SDK's track() contract with string-valued properties. It does not advertise page, identify or group support. By default, non-string property values reject the entire event; supply an explicit mapProperties policy if the application needs conversion. There is no silent stringification or unsupported-method no-op.
import { basemarks as basemarksAnalytics } from '@playstack/analytics/basemarks'
import { configureAnalytics } from '@playstack/analytics'
import { basemarksErrorBridge } from '@playstack/errors/basemarks'
import { configureErrors } from '@playstack/errors'
const analytics = configureAnalytics({
drivers: [basemarksAnalytics(basemarksClient)],
})
const errors = configureErrors({
drivers: [basemarksErrorBridge(applicationErrorTransport)],
environment: 'production',
release: 'storefront@2.4.0',
})applicationErrorTransport must implement captureError(error, normalizedEvent); it is not the Basemarks web SDK, which does not expose that method. The bridge defaults to no fingerprint/trace guarantee. Only declare capabilities the transport actually implements.
Analytics consent defaults to required. Its gate covers Playstack calls, not the SDK's automatic instrumentation. SDK initialization, consent policy, transport lifecycle and duplicate-report prevention stay application-owned. The adapter is written against the Basemarks track-only SDK and imports cleanly under SSR and browser bundling; verify live telemetry in your own Basemarks account.