---
description: >-
  You can add a test device and target it from the dashboard to ensure your
  notification is displayed correctly.
---

# How to send a test push notification to my web browser?

Batch allows you to find information on your installation and test your integration or make sure the notification you are editing works as expected on desktop or mobile.

The easiest way is to use either your [Installation ID](https://doc.batch.com/developer/sdk/web/testing-integration#finding-your-id) if it is displayed in your app, your [Custom ID](https://doc.batch.com/developer/sdk/web/profile-data/custom-user-id) if it is sent to Batch, or the email address linked to the profile if there is one. Once you retrieve your ID, go to point 2.

{% stepper %}
{% step %}
## Accept the push notification prompt <a href="#h_63f324406f" id="h_63f324406f"></a>

If you visit the website for the first time, you need to subscribe to push notifications (by clicking the **Allow** button):

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FfcxOUTcuggv9rfRHdVWo%2Fscreenshot.png?alt=media&#x26;token=e28b4ff9-21de-4a9a-95d8-be01489c90b0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
## Locate your Installation ID <a href="#h_17fa92f09d" id="h_17fa92f09d"></a>

There are two ways to locate your installation ID on the web.

### Through the search bar&#x20;

Simply write _javascript:_ in the URL bar of your website and copy and paste the following code:

_batchSDK('ui.showPublicIdentifiers')_

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FzZ3xeSwa2jT2AsbbJZ5e%2Fimage%20(5).png?alt=media&#x26;token=bbca41d0-0fc3-4f3c-ab79-15ab77e95d69" alt=""><figcaption></figcaption></figure>

### Through the Inspect window

Open your website, right-click somewhere on the page and select **Inspect** or **Inspect Element** in the context menu that appears.

Once you have the developer tools open, click the **Console** tab, paste the following code:

```
batchSDK('ui.showPublicIdentifiers')
```

For both methods, Batch's SDK will then return your identifiers:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FpXh0bX9icmRcp4y5d7It%2Fscreen1.png?alt=media&#x26;token=d3f10bab-f84f-40f9-83d3-4c76df1722cc" alt=""><figcaption></figcaption></figure>

Ensure that:

* **Subscribed to notifications?** is set to **Yes**
* The **Registration token** field is not empty

💡 If these conditions are not fulfilled, or if you do not see the identifiers pop-in, try resetting your browser opt-in preferences (follow this guide: [How can I reset my browser opt-in preferences?](https://help.batch.com/en/articles/3695988-how-can-i-reset-my-browser-opt-in-preferences)) and take this guide back to step 1.
{% endstep %}

{% step %}
## Find information on your device <a href="#id-2-find-information-on-your-device" id="id-2-find-information-on-your-device"></a>

On the dashboard, go to **Profiles** > **Search Profiles**, and paste your ID (with the correct ID type selected):&#x20;

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FmrKY6M1rphC9VqwGbN2J%2FCleanShot%202025-04-30%20at%2016.44.04%402x.png?alt=media&#x26;token=78b9f125-2437-4937-91de-9624032e8657" alt=""><figcaption></figcaption></figure>

In the **Platforms** section, find your browser and click on **View in debug** :point\_down:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2F7uOopBXqBCIqPD5iDwPj%2FCleanShot%202025-04-30%20at%2017.24.30%402x.png?alt=media&#x26;token=211643da-b1c2-438b-9663-2c4be7804f24" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you are using Batch's Mobile Engagement Platform (More on the [difference between Batch's CEP and MEP](https://app.gitbook.com/s/UIK868wiiK9XOVyETGZS/other/faq/what-are-the-differences-between-batch-customer-engagement-platform-and-mobile-engagement-platform)), go to **Settings > Debug**, and paste your ID (with the correct ID type selected).&#x20;
{% endhint %}
{% endstep %}

{% step %}
## Send a test notification <a href="#id-3-sending-a-test-notification" id="id-3-sending-a-test-notification"></a>

You can send a test notification from 3 different places:

### a) From the debug tool <a href="#a-from-the-debug-tool" id="a-from-the-debug-tool"></a>

{% hint style="info" %}
This feature is specific to Batch's Mobile Engagement Platform (More on the [difference between Batch's CEP and MEP](https://app.gitbook.com/s/UIK868wiiK9XOVyETGZS/other/faq/what-are-the-differences-between-batch-customer-engagement-platform-and-mobile-engagement-platform)).
{% endhint %}

In case you just need to test your integration, you can use the **Send test push** button, and Batch will send a generic message with an image to your device.

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FyYONE4OmTZURub1IV3Lu%2FCleanShot%202025-04-30%20at%2017.35.25%402x.png?alt=media&#x26;token=012b37f3-bdd0-4fe7-a69a-63219f89887d" alt=""><figcaption></figcaption></figure>

### b) From the list of registered test devices <a href="#b-from-the-list-of-registered-test-devices" id="b-from-the-list-of-registered-test-devices"></a>

You can see the list of all of the registered test deices from **Settings > Push Settings**. This is helpful to check if the token of your saved devices is still valid, and delete them if it's not the case:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2Fihc26YHviPWJo6gPNtq3%2FCleanShot%202024-05-28%20at%2011.08.48%402x.png?alt=media&#x26;token=c552cae6-9514-4641-8575-2f51bf8c8ce0" alt=""><figcaption></figcaption></figure>

### c) From the campaign editor

You can send test notifications to your device to see how your campaign looks from the campaign editor.&#x20;

Click on **Send a Test** and add your Installation ID or Custom ID in the corresponding field, then hit **Send test.**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FLdXVZrukk78TSq2LXG8k%2FCleanShot%202025-04-17%20at%2014.40.08%402x.png?alt=media&#x26;token=17b4a0ae-3eaf-4046-8ea7-e19f7f2824c9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Follow the instructions below if you are using Batch's Mobile Engagement Platform (More on the [difference between Batch's CEP and MEP](https://app.gitbook.com/s/UIK868wiiK9XOVyETGZS/other/faq/what-are-the-differences-between-batch-customer-engagement-platform-and-mobile-engagement-platform)).
{% endhint %}

Click ⚙️ to select your device in the saved devices, or copy your Installation ID in the corresponding field. Hit **Send a test:** \


<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FK5H3epetauRgBzkF8Uqq%2FCleanShot%202025-05-07%20at%2012.12.08.png?alt=media&#x26;token=efd1b643-0597-42f1-a2ce-5582d2a60059" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
## Locate your installation in your browser console <a href="#id-4-locate-your-installation-in-your-browser-console" id="id-4-locate-your-installation-in-your-browser-console"></a>

Alternatively, you can retrieve your Installation ID thanks to the console in the browser you are using.

### a. Chrome <a href="#a-chrome" id="a-chrome"></a>

Right-click anywhere on your website, then click **Inspect**.

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FFLKqOqQTG44uxDHtFN7a%2FScreenshot%202020-10-14%20at%2016.25.41.png?alt=media&#x26;token=930397f4-7efb-4c98-8ed0-9736022f335d" alt=""><figcaption></figcaption></figure>

Then click on the **Application** tab and go to IndexedDB > BatchWebPush > BatchKVData

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2F4YSoYmPQkvXr1fA4SeTC%2Fscreenshot243.png?alt=media&#x26;token=65122fb2-d8a2-405e-afbf-a9d1e2da6818" alt=""><figcaption></figcaption></figure>

You should then be able to get your Installation ID, for example here: 1bb71252-2b58-4285-9fe0-321c37ce5730.

### b. Firefox <a href="#b-firefox" id="b-firefox"></a>

Right-click anywhere on your website, then click **Inspect Element.**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FSSjKc3cBKvSONTLAH7Wr%2FScreenshot%202020-10-14%20at%2016.28.34.png?alt=media&#x26;token=842d88af-1b2b-4812-8b1f-eac919cce024" alt=""><figcaption></figcaption></figure>

Go to Storage > Indexed DB > Your Website URL > BatchKVData

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2Fdd6B4utpTE0UUQJj8Ha3%2FScreenshot%202020-10-14%20at%2016.31.28.png?alt=media&#x26;token=5181a440-9fc5-4bd8-b1fd-924cdd85a095" alt=""><figcaption></figcaption></figure>

Your installation ID is displayed on the first line, for example here: 61b11de8-5cc9-454f-a0b3-162f740b53a.

### c. Safari <a href="#h_6ef778404f" id="h_6ef778404f"></a>

Right-click anywhere on your website, then click **Inspect Element.**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2F358WohXDfsZa0l4E9RAg%2Finspect.png?alt=media&#x26;token=4a1b9ad2-50cc-4343-abd5-f1c049bf5638" alt=""><figcaption></figcaption></figure>

Then click on the **Storage** tab and go to **Indexed Databases** > **BatchWebPush** > **BatchKVData.**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FGZJsHVhaaezVgE9tSK0L%2Fconsole.png?alt=media&#x26;token=8e3a2d92-ecad-4e83-be01-f48c938bedf8" alt=""><figcaption></figcaption></figure>

You should then be able to get your Installation ID, for example here: ebccf486-961f-403e-97a3-39daf001f98c.
{% endstep %}
{% endstepper %}

