Content Cards for Web Integration

To toggle display of Content Cards through the Braze Web SDK, call:

appboy.display.toggleContentCards();

This method will toggle the visility of the Content Cards. By default, if no arguments are provided, all Content Cards will be shown in a fixed-position sidebar on the right-hand side of the page.

Parameters Description
parentNode The HTML node to render the content cards into. If the parent node already has a Braze content cards view as a direct descendant, the existing content cards will be replaced.
filterFunction A filter/sort function for cards displayed in this view. Invoked with the array of ab.Card objects, sorted by {pinned, date}. Expected to return an array of sorted ab.Card objects to render for this user. If omitted, all cards will be displayed.

See the JS docs for more information on toggling Content Cards.

Other Methods to Note

Method Description Link
showContentCards() Display the user’s Content Cards. JS Docs for showContentCards
hideContentCards() Hide any Braze content cards currently showing. JS Docs for hideContentCards
toggleContentCards() Toggle the visibility of the Content Cards. JS Docs for showContentCards
getCachedContentCards() Get all currently available cards from the last content cards refresh. JS Docs for getCachedContentCards
subscribeToContentCardsUpdates(subscriber) Subscribe to content cards updates.
The subscriber callback will be called whenever content cards are updated.
JS Docs for subscribeToContentCardsUpdates
WAS THIS PAGE HELPFUL?
New Stuff!