All Collections
Campaign Edition & Analytics
Message Edition
How can I send a test notification to my web browser?
How can I send a test notification to my web browser?

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

Baptiste avatar
Written by Baptiste
Updated over a week ago

Batch allows you to find information on your installation and save your push token to send test notifications to your web browser.

This is useful to test your integration or make sure the notification you are editing looks as expected on desktop or mobile.

Here is how to proceed:

1. Accept the push notification prompt

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

2. Locate your Installation ID

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')


Batch's SDK will return your identifiers:

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 don't see the identifiers' pop-in, try resetting your browser opt-in preferences (follow this guide: How can I reset my browser opt-in preferences?) and take this guide back to step 1.

3. Find information on your browser

On Batch's dashboard, go to Settings > Debug, and paste your Installation ID to find your device token. Then click "Save as a test device" :

Note: Web push notifications do not work in incognito mode.

4. Sending a test notification

You can send a test notification from 3 different places:

a) From the debug tool

In case you just need to test your integration, you can use the "Send a test" button (see screenshot above). Batch will send a generic message with an image to your device.

b) From the list of registered test devices

You can see the list of all the registered test devices 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.

c) From the campaign editor

You can send test notifications to your saved device or to a push token you already know from the message editor. Just click the βš™οΈ to select your device and "Send a test".

5. Locate your installation in your browser console

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

a. Chrome

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

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

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

b. Firefox

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

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

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

After you successfully retrieved your Installation ID, go to your Dashboard > Settings > Debug. Then select "Installation ID" and type your Installation ID, finally click on the debug button.

You should then be able to save this installation ID for future tests or simply send a push notification by clicking "Send test push".

c. Safari

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

Then click the "Storage" tab and go to "Indexed Databases" > "BatchWebPush" > "BatchKVData"

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


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?