Web SDK Changelog

2.4.2

Fixed
  • Fixed a bug introduced in 2.4.1 that would focus inline feeds, causing the page to scroll when content cards are shown out of view.

2.4.1

Added
  • Introduced a dismissCard method that can be used to dismiss a card programmatically.
  • Improved accessibility throughout the SDK:
    • Used <h1> tags for headers and <button> tags for close buttons
    • Added ARIA attributes
    • Improved the experience when tabbing through elements
    • We now restore the user’s previously focused element after closing In-App Messages
Fixed
  • Fixed a bug introduced in 2.4.0 that could cause a javascript error in integrations that only include the core library. This error would occur when a Content Card with a URL is received.

2.4.0

Breaking
  • Removed the Feedback feature and appboy.submitFeedback method from the SDK.
Added
  • Improved browser detection to account for the Smart TV landscape.
  • Added logic to automatically renew push subscriptions when they are expired or older than 6 months.
  • Introduced a contentSecurityNonce initialization option for sites with a Content Security Policy. See the appboy.initialize documentation for more info.
  • Introduced a disablePushTokenMaintenance initialization option for sites that have users with Web Push permission granted, but do not wish to use Web Push with Braze. See the appboy.initialize documentation for more info.
  • Introduced a manageServiceWorkerExternally initialization option for sites that have their own service worker already. See the appboy.initialize documentation for more info.
  • Deprecated the subscribeToNewInAppMessages method in favor of the new subscribeToInAppMessage method, which has a simpler interface.
Fixed
  • Improved support for In-App Messages on “notched” devices (for example, iPhone X, Pixel 3XL).
  • The logic that prevents the page behind a modal or fullscreen In-App Message from scrolling now functions correctly on iOS.
  • Fixed a caching bug that could cause In-App Messages, Content Cards, and News Feed Cards received by one instance of the Braze SDK to not be seen by another simultaneously running instance of the Braze SDK.
  • Fixed a bug that would cause redundant network activity for new users on their first session ever.
  • Fixed a bug that would cause push registration that occurs immediately on a user’s first session to fail.
  • Introduced the allowUserSuppliedJavascript initialization option, which is an alias for the existing enableHtmlInAppMessages option, and disabled the ability to use javascript: URIs in In-App Message and Content Card click actions unless one of these options is provided.
Changed
  • Improved the look and feel of Content Card dismissals and Content Card and News Feed animations to match the latest In-App Message styles.
  • The baseUrl configuration option for appboy.initialize is now more flexible in the values that it can accept.
  • Cookies set by the Braze Web SDK now expire after 1 year.

2.3.4

Fixed
  • Fix regression introduced in 2.3.3 that could prevent analytics from being logged from the service worker.

2.3.3

Fixed
  • Improved some In-App Message CSS styles to be more resilient against conflicts with any page-wide CSS.
  • Improved the resiliency of the code that allows body content to scroll again when modal or fullscreen in-app messages are dismissed.

2.3.2

Added
  • Added support for an improved integration snippet which is capable of stubbing the interface before the SDK loads in Google Tag Manager.

2.3.1

Added
  • Introduced new closeMessage method on ab.InAppMessage objects to enable integrations to programmatically close messages if desired.
  • The Braze Web SDK now automatically enqueues trigger events that occur while triggers are being synced with the Braze backend, and replays them when the sync is complete. This fixes a race condition that could cause users to inadvertantly miss messages when trigger events occur directly after calling openSession or changeUser. This change obsoletes usage of the messagingReadyCallback, which is now deprecated (but will continue to function).
Fixed
  • Fixed an issue which prevented tall ab.HtmlMessage objects from scrolling on iOS.
  • Fixed “Object doesn’t support this action” error in Internet Explorer 11 or older when showing ab.HtmlMessage objects.

2.3.0

Added
  • Improved the look and feel of In-App Messages to adhere to the latest UX and UI best practices. Changes affect font sizes, padding, and responsiveness across all message types. Now supports button border styling.
Fixed
  • This feature, which regressed in 2.1.0, has been restored: when you call appboy.openSession, if the user has previously granted the site permission to send push, Braze will now automatically send the user’s push token to Braze backend. This will allow users to continue to receive push messages if they manually remove push permission and then subsequently manually reenable it - and will also cause user push tokens to automatically migrate to Braze over time when moving to Braze from a previously-integrated third-party push provider.

2.2.7

Added
  • HTML In-App Messages now emit an ab.BridgeReady event when the appboyBridge variable is available for use inside your HTML, allowing you to use appboyBridge immediately when an in-app message is shown. To utilize this event in your HTML In-App Messages, use window.addEventListener('ab.BridgeReady', function() {/*Use appboyBridge here*/}, false);.
Changed
  • Changed usages of Date.now() to new Date().valueOf() to allow the Braze SDK to sit side-by-side with legacy 3rd party libraries that monkey-patched Date.now() before ECMASCRIPT 5 defined it.

2.2.6

Added
  • Added clicked property to Content Cards which returns true if this card has ever been clicked on this device.
Changed
  • Improved in-app message triggering logic to fall back to lower priority messages when the Braze server aborts templating (e.g. from a Connected Content abort in the message body, or because the user is no longer in the correct Segment for the message)
  • Improved in-app message triggering logic to retry user personalization when communication with the Braze server fails due to network connectivity issues.
  • The Braze Web SDK now only stores cookies for the most recently-used API Key (app). This reduces cookie storage usage for domains that are configured against many Braze apps.

2.2.5

Added
  • Added devicePropertyWhitelist property to the options for appboy.initialize(), which can be used to filter what device properties get collected.

2.2.4

Added
  • Added support for richer custom styling through CSS in in-app messages.
Changed
  • Subtle visual polish to the News Feed and Content Cards

2.2.3

Added
  • Added support for tracking custom location attributes. See the ab.User.setCustomLocationAttribute documentation for more information.
  • When calling appboy.registerAppboyPushMessages with a deniedCallback, that deniedCallback will now be invoked (with a temporary parameter of true) for temporary denials, where the browser has automatically denied permission on behalf of the user after multiple ignored attempts to register for push, but will allow attempts again in the future - probably in about a week.
  • Added appboyBridge.web.trackLocation() in HTML in-app messages. This enables HTML in-app message soft location tracking prompts.
Fixed
  • News Feed and Content Cards clicks and impressions will now be logged multiple times for a given card (if they in fact occur multiple times). Impressions will still only be logged for a given card once per viewing of the feed (regardless of how many times it scrolls in and out of view).
  • Improved logic around IndexedDB to better catch and log errors (prevents security errors with disabled cookies on certain browsers, or from Safari’s “Intelligent Tracking Prevention” when integrated in an iFrame).
  • Worked around this Chrome Bug which could cause device detection to throw “Unsupported time zone specified undefined” on Linux-based systems with certain settings.
  • Fixed an issue where the messagingReadyCallback would not get fired if changeUser was called with an empty ID.
Changed
  • Data will now be flushed to the Braze backend every three seconds when localStorage is not available.
  • Improved triggered in-app message re-eligibility logic to better handle templating failures.

2.2.2

Added
  • Updated push token handling to automatically remove blocked users from the pushable audience on session start.
Fixed
  • Fixed issue in Content Cards where the getUnviewedCardCount method on ab.ContentCards could not be invoked properly.
  • Fixed a bug where the addAlias method was returning an object instead of a boolean value.
  • Fixed issue which could prevent Content Cards from syncing properly on IE 11 and Safari.
Changed
  • Various user attribute methods now support setting null (setFirstName, setLastName, setCountry, setHomeCity, setPhoneNumber, setEmail, setGender, setLanguage, and setDateOfBirth) by passing in an explicit null value.

2.2.1

Fixed
  • Prevent push received/clicked analytics from being sent to the Braze backend when appboy.stopWebTracking has been called.

2.2.0

Added
  • Introduced support for Content Cards, which will eventually replace the existing News Feed feature and adds significant capability.
  • Added support for web push on Accelerated Mobile Pages (AMP). See https://www.braze.com/documentation/Web/#amp-support for setup information.
Fixed
  • Fixed an issue where in-app messages triggered on session start could potentially be templated with the old user’s attributes.
Removed
  • Removed appboy.requestInAppMessageRefresh() and support for legacy in-app messages - these were long-deprecated and have been supplanted by triggered in-app messages.

2.1.1

Fixed
  • Prevent push received/clicked analytics from being sent to the Braze backend when appboy.stopWebTracking has been called.

2.1.0

Added
  • Added appboy.wipeData() to allow deletion of locally stored SDK data. After calling this method, users will appear as a new anonymous user on a new device.
Fixed
Changed
  • Updated from FontAwesome 4.3.0 to FontAwesome 4.7.0. Integrations that wish to maintain older versions should pass in doNotLoadFontAwesome as true during initialization and load their desired version.
  • The Braze SDK will automatically load FontAwesome unless doNotLoadFontAwesome is explicitly passed in as true during initialization, regardless of whether fontawesome.css or fontawesome.min.css are already on the page.

2.0.9

Fixed
  • Prevent push received/clicked analytics from being sent to the Braze backend when appboy.stopWebTracking has been called.

2.0.8

Added
  • Added defensive guards against any possibility of sessions expiring in less than 1 second or of creating multiple session events in rapid succession if scripted in parallel across many open tabs.

2.0.7

Added
  • Added support for Voluntary Application Server Identification (VAPID) for Web Push:
    • Will be required for Microsoft Edge’s upcoming Web Push support, and possibly other browsers in the future.
    • Allows importing of VAPID-enabled push tokens generated by other push providers, given the corresponding keypair (support@braze.com).
    • Happens transparently in the background and does not require an integration update.
    • Once the browser landscape has sufficiently matured, this will eventually obviate the need to supply a gcm_sender_id in your site’s manifest.json.
Changed

2.0.6

Fixed
  • Fixed a javascript error introduced in 2.0.5 when logging in the service worker.

2.0.5

Added
Fixed
  • Fixed a bug that caused appboy.display.automaticallyShowNewInAppMessages() not to function correctly when called after calling appboy.destroy() and then calling appboy.initialize() a second time.
  • The openSession and changeUser methods now take a messagingReadyCallback that executes when the Braze Web SDK is ready to show messaging data to this user. This fixes a race condition where custom events could be logged before in-app messages had been fetched from the Braze backend and users would not see intended messaging.
Changed
  • Deprecated the submitFeedback method. The feedback feature is disabled for new accounts, and will be removed in a future SDK release.

2.0.4

Changed
  • Renamed documentation references from Appboy to Braze. This is not a breaking change.

2.0.3

Fixed
  • Fixed a null reference error when replaying calls made using the new integration snippet on IE 11.

2.0.2

Fixed
  • Fixed an issue with our minification that would cause the Braze Web SDK to leak polyfill functions into the global namespace.

2.0.1

Fixed
  • Fixed automatic css loading when used in combination with the doNotLoadFontAwesome initialization option.

2.0.0

Breaking
  • Braze now automatically loads required CSS styles. You must remove all references to appboy.min.css from your site.
  • The getUserId method now takes a callback which it invokes with the userId, instead of returning a value directly. This is necessary to ensure the proper replaying of calls made to appboy before the SDK has fully loaded. Where before, you would do var userId = appboy.getUser().getUserId();, now do appboy.getUser().getUserId(function(userId) { console.log(userId); }) See the getUserId method documentation for more information.
  • The getDeviceId method now takes a callback which it invokes with the deviceId, instead of returning a value directly. This is necessary to ensure the proper replaying of calls made to appboy before the SDK has fully loaded. See the getDeviceId method documentation for more information.
Changed
  • The default Braze integration snippet has been updated for best-practices compliance, resilience, and performance. Using this new snippet, calls may be made to appboy before the SDK has fully loaded, and will be replayed automatically when the SDK loads. We recommend that you update your site’s integration to the new snippet for optimal behavior, but this is not a breaking change, and is not required.
Added

1.6.14

Added
  • Added the user agent for the https://prerender.io/ crawler to the list of known web crawlers.
  • Added ab.User.setLanguage method to allow explicit control over the language you use in the Braze dashboard to localize your messaging content.
Fixed
  • Fixed array validation on pages where the Array type has been modified by other scripts.
Changed
  • Marked the ‘touchstart’ listener in in-app messages as ‘passive’ for performance and PWA compliance.

1.6.13

Added
  • Contains service-worker support for Web Push notifications that require user interaction to be dismissed.
Fixed
  • Improved time zone recognition on modern browsers to prevent possible ambiguity between different zones with similar UTC offsets.
  • Broadened detection of the Android OS to better recognize newer hardware and as-of-yet unreleased hardware on an ongoing basis.
  • Fixed data-formation error when pending additions or removals to a custom attribute array were re-enqueued following a Braze backend outage or otherwise failed data flush.
Changed
  • We now allow a value of 0 for the minimumIntervalBetweenTriggerActionsInSeconds option for appboy.initialize

1.6.12

Added
  • Introduced noCookies option. By default, the Braze SDK will store small amounts of data (user ids, session ids), in cookies. This is done to allow Braze to recognize users and sessions across different subdomains of your site. If this presents a problem for you, pass true for this option to disable cookie storage and rely entirely on HTML 5 localStorage to identify users and sessions. The downside of this configuration is that you will be unable to recognize users across subdomains of your site.
  • Added user aliasing capability. Aliases can be used in the API and dashboard to identify users in addition to their ID. See the addAlias method documentation for more information.
Fixed
  • Fixed issue in which the local cache of seen in-app messages and news feed cards was being cleared when the anonymous user was identified, allowing certain items to be retriggered or appear unread.

1.6.11

Added
  • When you call appboy.openSession, if the user has previously granted the site permission to send push, Braze will now automatically send the user’s push token to Braze backend. This will allow users to continue to receive push messages if they manually remove push permission and then subsequently manually reenable it - and will also cause user push tokens to automatically migrate to Braze over time when moving to Braze from a previously-integrated third-party push provider.
Fixed
  • IMPORTANT: Due to a behavioral change in Chrome 59, to reliably receive notifications, you must update the service worker from https://js.appboycdn.com/web-sdk/1.6/service-worker.js.
  • appboy.display.automaticallyShowNewInAppMessages() may now be safely called multiple times on the same appboy instance.

1.6.10

Fixed
  • A bug in our documentation for soft push prompts could cause Control Group stats to fail. If you previously implemented soft push prompts, please refer to the latest version of our documentation: https://www.braze.com/documentation/Web/#soft-push-prompts

1.6.9

Added
  • Added support for appboyBridge.web.registerAppboyPushMessages to allow HTML in-app messages to request push permission from the user.

1.6.8

Fixed
  • Fixed “Notification is not defined” error when calling appboy.isPushPermissionGranted/appboy.isPushBlocked on Chrome versions prior to 46.

1.6.7

Added
  • The Braze Web SDK now supports HTML content in-app messages. For your security, these must be enabled by supplying the enableHtmlInAppMessages configuration option when calling appboy.initialize.
Fixed
  • The News Feed css is now defensive against any global box-sizing css rules that may exist on your site, and handles classic card image styling more gracefully.
  • On mobile devices, Fullscreen in-app messages’ close buttons are sized relative to the entire device - this ensures touchable targets on high-resolution phones.
  • Improved positioning of Modal in-app messages to ensure visibility and attractive positioning across all browsers.

1.6.6

Fixed
  • Fixed a data-storage issue where a small number of users impacted by the issue fixed in 1.6.5 may record a new session on page load after upgrading to 1.6.5.

1.6.5

Fixed
  • Cookies are now stored with path=/ for sitewide accessibility, ensuring that identification persists sitewide in all situations. This fixes an issue introduced in 1.6.0.

1.6.4

Added
  • The Braze Web SDK now ignores web crawler activity by default - this saves datapoints, makes analytics more accurate, and may improve page rank (this change can be reversed with the allowCrawlerActivity initialization option).
Fixed
  • Fixed an issue where in-app messages triggered off of push clicks wouldn’t fire because the push click happened before the in-app message configuration was synced to the device.
  • Increased defensiveness against corrupted localStorage or cookie data.
Changed
  • Increased the size of in-app message close buttons on mobile browsers slightly to make an easier touch target.
  • Updated appboy.registerAppboyPushMessages to flush subscriptions to the server immediately.

1.6.3

Changed
  • Further improved the layout of Fullscreen in-app messages on short desktop screens.

1.6.2

Changed
  • Deprecated the appboy.isPushGranted method in favor of the new appboy.isPushPermissionGranted. The old method was inappropriately testing whether the browser has an active push subscription, and not doing the intended test of whether the user has granted push permission. The old method will be removed in an upcoming release.

1.6.1

Fixed
  • Improved Modal in-app message layout to prevent text-view scrolling until necessary.
Changed
  • Deprecated the safariWebsitePushId parameter to appboy.registerAppboyPushMessages and appboy.isPushGranted in favor of the new safariWebsitePushId option to appboy.initialize. If you implement Safari push, you should convert your integration to use the new initialization option - support for the parameters will be removed in a future release. This is not yet a breaking change.
  • Polished Fullscreen in-app message display on desktop browsers to reduce unused whitespace when the content is small enough not to scroll.

1.6.0

Fixed
  • Fixed an edge-case that could cause SlideUp in-app messages to appear offscreen if many were triggered in rapid succession.
Changed
  • Improved ability to consistently identify users, devices, and sessions across subdomains by preferring domain-wide cookies for ID storage (over the previously-preferred localStorage).

1.5.1

Fixed
  • Fixed a rendering issue that could cause FullScreen in-app messages to appear partially off-screen on very short browser windows.

1.5.0

Added
  • Added support for upgraded in-app messages including image-only messages, improved image sizing/cropping, text scrolling, text alignment, configurable orientation, and configurable frame color.
  • Added support for in-app messages triggered on custom event properties, purchase properties, and in-app message clicks.
  • Improved support for templated in-app messages.
  • Added appboy.isPushGranted() method, useful for migrating existing push subscriptions from another third-party provider to Braze.
  • Added language localization - language is detected automatically from the browser or can be specified explicitly via the language initialization option.

1.4.2

Added
  • Added additional logging information for Safari push.

1.4.1

Added
  • Added a more explicit error when attempting to call registerAppboyPushMessages on Safari without supplying a safariWebsitePushID.

1.4.0

Added
  • Added support for Safari push messages.
  • If you version your website, you may now optionally pass the version to Braze via the new appVersion initialization option.
  • The News Feed now displays a timed-out message to users if the refresh fails (due to network or back end outages).
  • Browser version will now be reported as part of the user’s device information along with browser.
  • Added ability to specify on a message-by-message basis whether in-app message clicks should open in a new tab or same tab.
Fixed
  • Fixed an issue which caused emoji in web push messages to be broken on Firefox.
Changed
  • Overhauled the browser detection code for improved reliability.

1.3.3

Added
  • Added a new serviceWorkerLocation initialization option. See JSDocs for more information.

1.3.2

Added
  • Added support for Braze Feedback through the new appboy.submitFeedback method.
Fixed
  • In-App Messages now track click analytics even when the click action is “None.”
  • Prevent Mobile Safari in Private Browsing mode from throwing an exception. This issue was introduced in 1.3.0.

1.3.1

Fixed
  • Prevent Firefox from throwing an exception when in Private Browsing mode. This issue was introduced in 1.3.0.

1.3.0

Breaking
  • The inAppMessages parameter to appboy.subscribeToNewInAppMessages subscribers may now contain ab.ControlMessage objects.
Added
  • Adds support for triggered in-app messages.
Fixed
  • Fixed a bug where news feed cards weren’t always immediately being marked as read during scrolling.
Changed
  • All iOS devices will now report their OS as “iOS” instead of “iPhone/iPod” or “iPad”.

1.2.2

Fixed
  • Fixed a javascript error that could occur when attempting to showFeed before the body has loaded.
  • Made in-app message buttons explicitly display:inline-block so that they still display correctly if the site is styling buttons as display:block.

1.2.1

Fixed
  • The service worker now reads Braze’s backend URL from IndexedDB, which allows web push to function for clients with custom Braze endpoints.
  • isPushBlocked now returns false when isPushSupported is false instead of erroring.

1.2.0

Breaking
  • Restyled the news feed for improved legibility with a wider variety of card content. If you have existing news feed css customization this may be a breaking change.
Added
  • Supports web push (on browsers implementing the w3c spec, with or without payloads - i.e. Chrome, Firefox).
  • Introduced appboy.toggleFeed as a convenience method - it simply calls appboy.showFeed or appboy.destroyFeed based on whether there’s currently a feed showing.
Fixed
  • Buttonless FullScreen and Modal messages now respect body click actions from the dashboard.
Changed
  • To reduce the datapoint impact of the high number of anonymous users on the web, in-app messages are no longer. automatically refreshed for new, anonymous users on their first openSession call. You can override this behavior and force an in-app message refresh by manually calling appboy.requestInAppMessageRefresh.
  • In-App Messages may now be dismissed with a click on the greyed-out background of the page. This behavior may be prevented by passing requireExplicitInAppMessageDismissal:true to appboy.initialize.

1.1.1

Added
  • Expanded browser detection to recognize more niche browsers.
Fixed
  • Fixed an issue which would cause some Android devices to be detected as Linux.

1.1.0

Added
  • Introduced appboy.logFeedDisplayed, which is called automatically when using appboy.display.showFeed.
Fixed
  • Fixed a race condition which could cause events to be double-counted if the user had the site open in very many tabs at once.
Changed
  • News feed and in-app message links now open in the same tab.

1.0.1

Fixed
  • The SDK now logs correctly to the console when enableLogging is true (or toggleAppboyLogging has been called) and no custom logger has been specified.

1.0.0

Added
  • Respect blacklisted custom events, attributes, and purchases.
Removed
  • Removed the setBio method on ab.User in accordance with the deprecation of that user property across the Braze platform.

0.2.4

Fixed
  • Fixed an issue which was causing the in-app message refresh throttle not to persist beyond a single page load.

0.2.3

Added
  • Introduce appboy.display.destroyFeed method to allow integrators to implement a toggle feed button or otherwise hide the feed from code.
Fixed
  • Prevent potential race condition which could cause news feed cards to not be marked as read for a short amount of time.
Removed
  • Remove the news feed z-index. If necessary, the z-index can be set manually via CSS: .ab-feed { z-index: }.

0.2.2

Fixed
  • Fix issue where already-cached news feed cards were not properly having impressions logged when the news feed was first shown.
Changed
  • Minor improvements to In-App Message styling.

0.2.1

Added
  • Give the news feed a z-index just below bootstrap modal backdrops.
Fixed
  • Support legacy Internet Explorer (complete IE9 support, generally functional IE8 support).
Changed
  • Ignore in-app messages with an unknown type (prevents future message types from be inappropriately displayed on versions of the sdk which don’t yet support them).

0.2.0

Added
  • Added Braze news feed support.

0.1.5

Fixed
  • Correctly identify IE11.

0.1.4

Fixed
  • Fixed issue where SlideUp message clicks with a clickAction of URI were not being respected.
  • Fixed issue where Date custom attributes, custom event properties, and purchase properties were not being recognized as Dates by the Braze platform.

0.1.3

Added
  • Add support for more purchase currencies, allow lowercase currencies.
Changed
  • Use millisecond precision when logging events.

0.1.2

Changed
  • Introduce optional doNotLoadFontAwesome initialization option and additionally don’t load FontAwesome if fontawesome.css or fontawesome.min.css are already on the page.
  • More minor improvements to In-App Message styling.

0.1.1

Changed
  • Various minor improvements to SlideUp styling.

0.1.0

Added
  • Support in-app messages.

0.0.5

Fixed
  • Fixed critical issue which caused browser tabs to become unresponsive with no network connection.

0.0.4

Fixed
  • Defend against NS_ERROR_FILE_CORRUPTED (corrupted browser SQLite database) and more generally against inability to use localStorage.

0.0.3

Changed
  • Provide better backend error messages.

0.0.2

Fixed
  • Fixed a bug where due to minification, locally stored data was version-specific.

0.0.1

Fixed
  • Fixed bug where multibyte UTF-8 characters were being rejected for various attributes.
  • Harden usage of localStorage slightly.
Changed
  • Allow setLogger to be called before initialize.

0.0.0

  • Initial release with core functionality.
WAS THIS PAGE HELPFUL?
New Stuff!