Web modals and embeds
2 min
To manually display web content based on your own criteria, ODP provides an SDK method for your development team to utilize.
Web dialog boxes (modal)
You can trigger a dialog box in custom scenarios—such as when your customer adds an item to cart or logs in—by calling the dispatch() method.
zaius.dispatch(
'web',
'showContent', {
contentId: '<insert_content_id>',
target: {
selector: '<insert css selector>', // empty string for modals
position: 'modal' // modal | before | after | inside | replace
}
});📘 Note You must create and launch a campaign in ODP before this snippet will work. See The basics of campaign setup.
Web embeds
Web embeds are handled in the ODP application. See Manage web embeds.