---
title: Web push
slug: data-platform/docs/websdk-web-push
docTags: 
createdAt: 2026-08-10T12:05:19.000Z
---

:::hint{type="warning"}
**Web push availability**
Only customers onboarded prior to July 15, 2022 have access to the Campaigns and Web push functionality. For more information, contact your customer success manager.
:::

## Advanced initialization

If you want to create your own web push subscribe experience, ODP supports custom initialization options.

To manually handle Web Push initialization (instead of automatically initializing) go to step 5 of Web Push wizard within ODP: **Account Settings > Integrations > Web Push**. For more information about setting up Web Push in the ODP application, see [Create web push notifications](../data-platform/campaigns-legacy/campaign-content/create-web-push-notifications.mdx) and [Enable web push notifications](../data-platform/campaigns-legacy/campaign-content/enable-web-push-notifications.mdx).

:::hint{type="info"}
**Note**
Integration of web push will not be marked as "live" but should be configured.
:::

### Display subscription modal on a specific page

In JavaScript on your website, [AFTER ODP is initialized](docId\:uSckrFlNPTg3aQgAZr1rp), perform any JavaScript logic and call this when you are ready to show the subscription UI:

```javascript
{
  "codes": [{
    "code": "zaius.dispatch('webPush', 'initialize', {websiteID: ''})",
    "language": "javascript",
    "name": "Show Subscribe"
  }]
}
```

:::hint{type="warning"}
**Important**
`websiteID` is the name given in the web push subscribe setup, NOT your tracker\_id.
:::

### Custom Initialization

In JavaScript on website, AFTER ODP is initialized, perform any JavaScript logic and call this when you are ready to show the subscription UI:

```javascript
zaius.dispatch('webPush', 'initialize', 
  {websiteID: '<ZAIUS_WEBSITE_ID>', 
   subscribeUI: {enabled: false}}
  );

//Then, check the subscription status before showing your subscription UI:
zaius.dispatch('webPush', 'subscriptionStatus', function(status, token) {
  if (status !== 'subscribed' && status !== 'denied') {
    // show subscribe UI
  }
});

//Finally, when you want the browser to ask the user to allow push notifications call:
zaius.dispatch('webPush', 'askToSubscribe');
```
