Once you have completed the steps described in the web push integration guide, there are several elements that you should check to make sure you will be able to use Batch at its full potential.

There are two scenarios if you integrate web push:

Case A: The notification prompt is triggered correctly

In this case, follow these steps:

1. Send a test push to your browser

Allow push notifications and try sending a test notification to your browser.

Here is how to do it: How can I send a test notification to my web browser?

2. Review your website icons

Ensure icons match the required size and format (see documentation).

In particular, make sure that the small icon has a transparent background and is properly displayed (i.e. not a grey circle) on Android.

Here is how to send a test notification to a web browser on Android.

3. Firefox custom alert (optional)

If you choose to use Batch pre-permission prompts to set a custom alert on Firefox, ensure it is displayed when you arrive on the website and fits the custom UI that you want to display.

4. Custom User ID (optional)

If you choose to set up a Custom User ID, make sure it is sent to Batch when you log in on the website using the Debug tool on the dashboard (Settings > Debug) and your Installation ID.

You can use the refresh button to see the latest data.

Note: The Custom User ID must be reset when the user logs out on the website. (i.e. the field must be empty)

5. Language & Region (optional)

If you choose to overwrite the default values detected by the SDK with the user's selection in the website, you can check that it is updated correctly using the Debug tool on the dashboard (Settings > Debug) and your Installation ID.

You can use the refresh button to see the latest data.

Case B: The permission prompt is not triggered on your website

In this case, check the following:

1. Clear the data stored for your website

Make sure you reset your browser preferences between each test: see how to do it here.

2. Staging domain name

If you deployed Batch on a staging version of your website, make sure your JavaScript tag contains the "dev: true" parameter and you added your staging domain name to the list of "Allowed dev origins", from the dashboard Settings > Push settings. (see How to test web push on development environment?)

3. Dev mode

If you deployed Batch in production, make sure you removed the "dev: true" parameter from the Javascript tag.

4. Service worker

Make sure that the Service Worker is well integrated at the root of your website: type the name of the service worker after the domain name (e.g. mywebsite.com/batchsdk-worker-loader.js).
You may have chosen to add the service worker in a subfolder, in which case the path must be indicated in the JavaScript tag (see documentation).
In case you integrated it with an existing service worker, ensure you followed all steps of this documentation.

Need more help?

If you have any questions, don't hesitate to ping us at support@batch.com, or directly on the live-chat!

Did this answer your question?