Automatically display new in-app messages when they come in from the server.
The identifier of the subscription created. This can be passed to 'appboy.removeSubscription` to cancel the subscription.
Destroy any Braze news feed currently showing. This method will appropriately clean up any retained resources and also display the hiding animation, and so should be used instead of manually removing feed html from the DOM.
Hide any Braze content cards currently showing in the parent node, or if none is provided, any content cards in the page. This method will appropriately clean up any retained resources and also display the hiding animation, and so should be used instead of manually removing content cards HTML from the DOM.
The HTML node that denotes the parent of the content cards to be hidden. If null/undefined, all content cards on the page will be hidden.
Display the user's content cards.
The HTML node to render the content cards into. If null/undefined, the content
cards will be rendered in fixed position over the right-hand side of the page and appended to the <body>
node. If the parent node already has a Braze content cards view as a direct descendant, the existing content
cards will be replaced.
Display the user's news feed.
The HTML node to render the news feed into. If null/undefined, the feed will be
rendered in fixed position over the right-hand side of the page and appended to the <body>
node. If the
parent node already has an Braze news feed as a direct descendant, the existing feed will be replaced.
A static set of cards to display. Each item in this Array should be a Card
descendant. If this parameter is null/undefined, all unexpired cards from the last news feed refresh will be
used automatically, a feed refresh will be kicked off automatically if the cached cards are more than 1 minute
old, and the feed will automatically update when new cards are received while it is still showing. If you
provide an explicit set of cards by using this parameter, no action will be taken when new cards are received,
and you must subscribe to feed updates yourself with appboy.subscribeToFeedUpdates
and request updates with
appboy.requestFeedRefresh
if you want to update this feed with new cards.
A set of categories to filter cards to. Each item in this Array should be a card category as set in the Braze dashboard. If omitted, all cards will be displayed.
Display a given in-app message.
The message to display.
The HTML node to render the in-app message into. If null/undefined, the message
will be rendered appended within the <body>
node.
Optional callback to invoke once the message is on the screen.
Whether or not the message was displayed (or, in the case of control messages, logged to Braze servers).
Toggle the display of Braze content cards, showing them if they are not shown, and hiding them if they are. If you
wish to display multiple content cards feeds on a page simultaneously, you should use showContentCards
and hideContentCards
to show/hide each feed individually instead of this method.
The HTML node to render the content cards into. If null/undefined, the content
cards will be rendered in fixed position over the right-hand side of the page and appended to the <body>
node. If the parent node already has a Braze content cards view as a direct descendant, the existing content
cards will be replaced.
Toggle the Braze news feed, creating it if it does not exist, and destroying it if it does.
The HTML node to render the news feed into. If null/undefined, the feed will be
rendered in fixed position over the right-hand side of the page and appended to the <body>
node. If the
parent node already has an Braze news feed as a direct descendant, the existing feed will be replaced.
A static set of cards to display. Each item in this Array should be a Card
descendant. If this parameter is null/undefined, all unexpired cards from the last news feed refresh will be
used automatically, a feed refresh will be kicked off automatically if the cached cards are more than 1 minute
old, and the feed will automatically update when new cards are received while it is still showing. If you
provide an explicit set of cards by using this parameter, no action will be taken when new cards are received,
and you must subscribe to feed updates yourself with appboy.subscribeToFeedUpdates
and request updates with
appboy.requestFeedRefresh
if you want to update this feed with new cards.
A set of categories to filter cards to. Each item in this Array should be a card category as set in the Braze dashboard. If omitted, all cards will be displayed.
appboy.display is the public class for the UI portions of Braze's Web SDK. It is only available in
https://js.appboycdn.com/web-sdk-develop/3.4/appboy.min.js
and is stripped from the more minimalhttps://js.appboycdn.com/web-sdk-develop/3.4/appboy.core.min.js
.