SDK changelog

Change log and release notes for the Batch SDK.

Minor and patch releases are automatically rolled out to pages. You can upgrade between major versions by changing the version of the script included in your webpage:

  • Look for in the script tag, where v4 is the major version.
  • Your service worker file also needs to be updated to match the tag's version, or the SDK might fail to start and/or display notifications.



  • Batch will now start even if the current browser does not support push messaging features.

Core - Service worker:

  • Batch will now detect if the ServiceWorker isn't setup as expected and breaks the SDKs functionality.


This is a major release, please see our Migration Guide for more info on what changed since 3.x.


  • Added builtin German translations.
  • Added optional defaultDataCollection configuration object to the Batch's setup method. This allows you to enable the geoip back-end resolution for the user's region attribute which is now disabled by default.
  • Added optional migrations configuration object to the Batch's setup method. This allows you to disable data migrations to the new Batch user-centric data model (enabled by default).

Core - Service worker:

  • Moved Service Worker related configuration keys in a serviceWorker object.
  • automaticallyRegister replaced useExistingServiceWorker. Set it to false to prevent Batch from automatically registering its worker. Default: true.
  • waitTimeout replaces serviceWorkerTimeout but works the same.
  • 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.
    Be careful: Batch can't check that this SW will properly work, your integration might break if your SW is not valid for push notifications.
    Using registration requires automaticallyRegister to be false. Not setting it defaults to navigator.serviceWorker.ready.
  • serviceWorkerPathOverride has been removed: manually register a service worker with your custom path and give the Promise to the SDK in registration.

Core - User/Profile:

In the past, data was siloed between different platforms. However, Projects remove this limitation by introducing profiles. Each Project is associated with a unified userbase made up of profiles. When users interact with any of the platforms (website, iOS app, Android app...) within a Project, their actions are fed into the associated Profiles.

Web SDK v4 APIs are fully compatible with profiles and allow you to set attributes and events on omnichannel profiles:

  • Removed setCustomUserID API (has been replaced with identify).
  • Removed getCustomUserID API. (no equivalent)
  • Removed setUserLanguage API (has been replaced with setLanguage).
  • Removed setUserRegion API (has been replaced with setRegion).
  • Removed editUserData API (has been replaced with edit).
  • Removed IUserDataEditor interface. (has been replaced with IProfileDataEditor).
  • Removed addTagAPI (has been replaced with addToArray).
  • Removed removeTagAPI (has been replaced with removeFromArray).
  • Updated trackEvent parameters (EventDataParams):
    • Added support for Array and Object attribute types.
    • Replaced optional tag attribute with $tags as reserved key under the attributes object.
    • Replaced optional label attribute with $label as reserved key under the attributes object.
  • Added profile API to get the public profile module. Please see API references for more info.
  • Added identify API under IBatchProfile as replacement of setCustomUserID.
  • Added edit API under IBatchProfile as replacement of editUserData.
  • Added setEmailAddress API (this requires to have a custom user ID registered).
  • Added setEmailMarketingSubscription API.
  • Added setLanguage API under IProfileDataEditor as replacement of setUserLanguage.
  • Added setRegion API under IProfileDataEditor as replacement of setUserRegion.
  • Added clearInstallationData API. Clear all related data to the user's installation and wipe user's local data. This doesn't affect profile's data.



  • Changed rules used to determine whether events should be sent immediately to Batch's backend or enqueued.


  • Enabled iOS Web Push. Requires iOS 16.4+ and for the PWA to be installed as a standalone app.



  • subdomain is now optional in the configuration object. Previously, omitting subdomain resulted in notifications not showing their icon and image and failing to open the website on click.


  • Batch now uses Web Push Protocol as default on Safari if a user is not already subscribed with APNS.


  • The alert UI component now supports adding a configurable "extra" button in its configuration. See the documentation for more info.


  • Fixed an issue where the native UI component would not automatically resubscribe a user if the backoff duration was not elapsed.



  • Improved validation of susbcriptions before they're sent to Batch's servers.


  • Fixed an issue where UI Components would be stuck "loading" even after a user granted or denied the push permission due to a Safari bug.



  • Added api.refreshServiceWorkerRegistration() to re-synchronize Batch's internal state with the current Service Worker registration.
  • Added api.doesExistingSubscriptionKeyMatchCurrent() to check if the current Service Worker (if there is one) registration's push applicationServerKey matches the one Batch is configured with.

See their jsdoc for more info.


  • Optimize custom data sync if no data has been set.

UI Components:

  • Added the showIfPermissionGranted (boolean, default: true) configuration option on the Alert format. Setting it to false will make it so Alert doesn't show if the user has already granted the notification permission, even if they're not subscribed to Batch. In that case, they will not be automatically resubscribed until you call api.subscribe().



  • Added support for custom attributes and tags. See the documentation for more info.



  • Added support for custom events.
    See the documentation for more info.



  • Enhance compatibility of UI Components with AMP pages with the Custom Elements polyfill applied.

UI Components:

  • Fix a regression on the alert UI Component where styling might not be applied properly



  • Worked around an issue where the SDK would not start on websites where DOMContentLoaded is not bubbled.


This is a major release, please see our Migration Guide for more info on what changed since 2.x.


  • Added support for Safari push notifications. This requires additional configuration on Batch's dashboard and the SDK's configuration: see our documentation for more info. Safari 12 or higher is required.
  • Removed support for HTTP/Multidomain mode (sameOrigin becomes deprecated, remove it to the SDK configuration). This requires a change to the SDK configuration: see our migration guide for more info.
  • defaultIcon and smallIcon are now optional and can be remotely configured using Batch's dashboard. Setting your own URLs is still supported.

UI Components:

  • If the defaultIcon image cannot be loaded, UI components will now hide the image rather than display the browser’s generic broken image placeholder.



  • Ensure SDK stays disabled on future iOS versions. As of writing, v2 doesn't start on any iOS version: if you want to support iOS when web push becomes supported by Apple, please use the v3 or higher.



  • Enhance compatibility of UI Components with AMP pages with the Custom Elements polyfill applied.
  • Worked around an issue where the SDK would not start on websites where DOMContentLoaded is not bubbled.
  • Fix an issue where the current "dev" config value was not logger properly.


UI Components:

  • Fix an issue where alert styling would not be applied properly.


Bumped minimal browser versions:

  • Edge (Old) 16 (unchanged)
  • Chrome 55 (previously 50)
  • Firefox 53 (previously 46)
  • Edge Chromium 77


  • Added getConfiguration(), which gets a readonly copy of the SDK configuration for debugging.
  • Better logging of service worker registration errors.
  • Added webp images for Firefox.
  • Fixed an issue where calling setup twice resulted in unexpected behaviour.


  • set/get UserLanguage/UserRegion/CustomUserID's type checking have been improved:
    • They can no longer return undefined: They will always return null if not set.
    • They accept both null and undefined to unset their values.
  • Updated getInstallationID definition to match that it could never return null

UI Components:

  • Fix various theming issues on the button format.
  • Additional stable identifiers have been introduced on multiple formats.
  • Added a ui component that can display the public identifiers (Installation ID, Custom User ID, ...).
    It can be shown by calling batchSDK('ui.showPublicIdentifiers')
  • Fixed a bug on Chrome where the native notification permission popup could be displayed twice if the user dismissed it.


  • Removed support for opening deeplinks in a pre-existing tab. A new tab is now always opened.



  • Reworked how including our service worker is done. It will now be automatically updated to the latest version. This also gets rid of the async importScripts which could cause issues in a shared service worker environment.

Note: This version comes with an update to the service worker loader and shared worker implementation. You will have to redownload batchsdk-worker-loader.js and deploy it to your website. If using the shared worker, download batchsdk-shared-worker.js and replace your existing setupSharedBatchSDK method with the new one.

If you rely on a shared service worker implementation, please upgrade ASAP to stay compatible with latest Chrome and Firefox versions.



  • Fix an issue where the registration token would not be immediatly sent to the server, if the service worker had been unregistered by a 3rd party
  • Fix an issue where calling Batch's API would fail if called before the SDK is ready. Calls will now be enqueued properly.

UI Components:

  • Fix popin's title propery not being honored in configuration.


UI Components:

  • Improved button format rendering on mobile devices.
  • Replaced header tags from UI components with more simple tags.
  • Fixed banner's left position.
  • Fixed a Firefox bug where alert might never appear.
  • Implement pushsubscriptionchange on the ServiceWorker
  • Lazy load help images for browser permission re-optin
  • Help images are now available in webp for chrome, and their PNG versions have been optimized


  • Fix a link replacement bug in the popin UI component


  • Fix Alert buttons not showing up on Chrome 58 and lower.


  • Fix RTL text alignment on the Alert format
  • Fix some UI components not working anymore with Chrome 60 and lower


  • Fix an issue where opening a notification in Chrome would not do anything


  • Fix a registration bug with Chrome 62+ in multidomain/insecure mode
  • Fix an issue where the button's example push would show incorrectly


  • Added a new UI component format: Alert
  • The "button" UI component now supports configuring a preview of the push notifications users rather than a placeholder
  • The "button" UI component now supports changing the bell's hover color, using the hoverForegroundColor configuration key
  • Exposed the previously undocumented "ui" object of the SDK's public API.
  • Most UI components now support a autoShow configuration option, preventing them to be automatically shown. (usage. ui:{ banner: { autoShow: false } })
  • Banner's hideFor default value is now 7 days
  • Added "", and "ui.hide" methods, allowing developers to have control over when UI components should be displayed. Should be used with autoShow: false. (usage: batchSDK("", "banner"))