---
title: Web modals and embeds
slug: data-platform/docs/websdk-web-modals-embeds
docTags: 
createdAt: 2026-08-10T12:05:17.000Z
---

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.

```javascript
zaius.dispatch(
'web', 
'showContent', {
  contentId: '<insert_content_id>', 
  target: {
    selector: '<insert css selector>', // empty string for modals 
    position: 'modal' // modal | before | after | inside | replace
  }
});
```

:::hint{type="info"}
**Note**
You must create and launch a campaign in ODP before this snippet will work. See [The basics of campaign setup](../data-platform/activations/campaign-engagement/understand-campaign-configuration-basics.mdx).
:::

## Web embeds

Web embeds are handled in the ODP application. See [Manage web embeds](../data-platform/activations/campaign-content/manage-web-embeds.mdx).
