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 v3 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.



  • 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"))