> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/guides-and-best-practices/message/push-notifications/how-to-send-a-test-push-notification-to-your-web-browser.md).

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

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

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 on your website, 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 3.

{% 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

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 **✅**

{% hint style="warning" %}
If these conditions are not fulfilled, or if you do not see the identifiers pop-in, try [resetting your browser opt-in preferences](https://doc.batch.com/guides-and-best-practices/profiles/how-to-reset-your-browser-opt-in-preferences).
{% endhint %}

You can also retrieve your Installation ID from your browser console (see the last step).
{% endstep %}

{% step %}

## Find 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 **Data** > **Find Profile**, and paste your ID (with the correct ID type selected):

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FfWI1E7tHLnOyi36pGnim%2FCleanShot%202026-10-20%20at%2017.56.34%402x.png?alt=media&amp;token=02ced567-bdb2-4565-b457-4211d65e4b25" alt=""><figcaption></figcaption></figure>

In the **Platforms** section, find your browser and click on **Inspect**:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FsjmzXuiZE1yBRT1a24ji%2FCleanShot%202026-10-20%20at%2017.57.08%402x.png?alt=media&amp;token=ece54058-8598-436c-ae7e-2eb365ae1d0a" alt=""><figcaption></figcaption></figure>

This opens the device pop-in, from which you can send a test push and save the device as a test device:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FfGfai2cYy1HXpbt0T1q7%2FCleanShot%202026-10-20%20at%2017.57.48%402x.png?alt=media&amp;token=c3f78af9-f772-499d-b130-ce60b47bae26" alt=""><figcaption></figcaption></figure>
{% 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 2 places:

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

If you just need to test your integration, click **Send test push** in the device pop-in. Batch sends a test notification to your browser.

### b) From the message editor <a href="#c-from-the-campaign-editor" id="c-from-the-campaign-editor"></a>

To see how your message looks, send a test from the message editor. You can send a test two ways:

* Click on **Send Test** **> Saved recipients** and select the recipient you want to send the test to, then hit **Send test:**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FG4hk0oJOrYdQPwGSQbNg%2FCleanShot%202026-06-30%20at%2014.18.54%402x.png?alt=media&#x26;token=751f5431-fd7c-4f88-bc43-11ad541466cf" alt=""><figcaption></figcaption></figure>

* Click on **Send Test** **> One-time recipient**, choose the identifier type (**Custom ID**, **Installation ID** or **Push Token**), enter it 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%2Fh9s322ULSLHMa1WNanvS%2FCleanShot%202026-06-30%20at%2014.22.02%402x.png?alt=media&#x26;token=eaa0a9e3-9af4-4f7c-88b2-a36bc78ddc05" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Save your device as a test recipient <a href="#b-from-the-list-of-registered-test-devices" id="b-from-the-list-of-registered-test-devices"></a>

You can save a test device once and reuse it for every future test, instead of looking up its Installation ID or Custom ID each time. There are two ways to do this:

* From the device pop-in (see step 3), click **Save test device**.
* From **Settings > Channels > Push**, under the **Test recipients** tab. Click **New recipient**, give it a name, and enter its Custom ID, Installation ID, or Push Token:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2Fspc2tknRJU7wt2KqUsVi%2Fimage.png?alt=media&#x26;token=c63ca7ce-9932-405d-b2f7-00715c7c922f" alt=""><figcaption></figcaption></figure>

Recipients saved this way are available at the project level and can be selected directly when sending a test from the Push, In-App, or Mobile Landing message editor.
{% 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.

### 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.batch.com/guides-and-best-practices/message/push-notifications/how-to-send-a-test-push-notification-to-your-web-browser.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
