Migrating from v3
Upgrading the SDK version
Service worker configuration
batchSDK('setup', {
...,
// Optional service worker related configuration.
serviceWorker: {
// Optional - default: 10 seconds.
// Maximum waiting time for your Service Worker to be ready.
// Replaces `serviceWorkerTimeout` but works the same.
waitTimeout: 5,
// Optional - default: true.
// Whether Batch should automatically register its service worker.
// Replaces `useExistingServiceWorker` and works in the opposite way (default true, false to disable).
automaticallyRegister: false,
// Optional. A promise that resoves a service worker registration.
// Allows you to have Batch use a specific Service Worker registration.
// This can be a Service Worker registration for a sub-scope that does not control the current page.
// Requires `automaticallyRegister` to be false.
registration: navigator.serviceWorker.register("your_custom_path")
}
});
Profile data collection
Data collection
Data migration
Event data
Last updated

