Self Handled Cards
Fetch card campaign data via the MoEngage SDK and build custom card UI on your website.
Self-handled cards allow you to create Card Campaigns on the MoEngage Platform and display the cards anywhere inside the website. SDK provides APIs to fetch campaign data, which you can use to create your view for cards.
Cards is a separate module and it gets loaded asynchronously with core SDK module. So it may not be available immediately on the page load.
Please use this event listener and call the Cards API once it has been initialised:
If you are using npm package, then use this helper function:
Additionally, you can have an All category which would be a superset of all the categories. Use the isAllCategoryEnabled() API.
To fetch all the cards eligible for display irrespective of the category, pass the category ‘All’ as shown below