Content Card integration
This article covers how to set up Content Cards for Cordova.
To get started, the Braze SDKs include a default card feed. To show the card feed you can use the BrazePlugin.launchContentCards()
method.
The default card feed included with the Braze SDK will handle all analytics tracking, dismissals, and rendering for a user’s Content Cards.
Customization
You can use these additional methods to build a custom Content Cards Feed within your app:
Method | Description |
---|---|
BrazePlugin.requestContentCardsRefresh() |
Sends a background request to request the latest Content Cards from the Braze SDK server. |
BrazePlugin.getContentCardsFromServer(successCallback, errorCallback) |
Retrieves Content Cards from the Braze SDK. This will request the latest Content Cards from the server and return the list of cards upon completion. |
BrazePlugin.getContentCardsFromCache(successCallback, errorCallback) |
Retrieves Content Cards from the Braze SDK. This will return the latest list of cards from the local cache, which was updated at the last refresh. |
BrazePlugin.logContentCardClicked(cardId) |
Logs a click for the given Content Card ID. |
BrazePlugin.logContentCardImpression(cardId) |
Logs an impression for the given Content Card ID. |
BrazePlugin.logContentCardDismissed(cardId) |
Logs a dismissal for the given Content Card ID. |