"Prompting" is asking users for permission to send them push notifications. Prompts are pop-up messages presented by the browser or mobile app and require the user to click "Allow" to be subscribed.
If you have a mobile app, see our iOS Prompt Guide. Android Mobile App devices don't need to be prompted, they get subscribed when opening your app for the first time.
Web Push works on Desktop and Android. Apple does not support web push on iOS like iPhone and iPad. Browsers provide their own Native Permission Prompt, which is required to be both shown and clicked "Allow" for the user to subscribe to your website.
Browsers now highly recommend websites be more selective when it comes to showing the Native Permission Prompt. This is why using OneSignal Prompts or your own custom "soft prompts" before the native prompt is encouraged.
OneSignal provides "soft prompts" that are shown before the Native Permission Prompt and engage the user to select categories they are interested in getting messages about and provide phone or email. These prompts do not replace the native prompt and do not subscribe the user to web push.
These prompts are beneficial because they increase the likelihood users will stay subscribed to your messages and are highly recommended by the browsers. Permission prompts do three things:
- Inform a user of the value of subscribing to Push Notifications, Email and SMS
- Prevent users from being blocked from subscribing.
- Trigger a Native Prompt, if users indicate intent.
OneSignal Prompts are a 'soft request', meaning that they are not invoking the 'hard request' of the browser's Native Permission Prompt. This is important because if a user denies the native prompt, the developer is unable to prompt the user again, unless the user goes through a multi-step process to re-enable these permissions. On the other hand, if a user dismisses a Soft Prompt, the app or website can still present them the option later on.
The Slide Prompt displays on top of your site, in the top center of the browser (bottom center on Android).
The Category Slidedown works just like the regular Slide Prompt except it also allows subscribers to opt-in or out of notification categories. The Category Slidedown is configurable through the dashboard for Typical Site setup and can also be configured via custom code.
|Learn more about Category Slidedown|
The Email & Phone Number Slidedown adds optional text fields for users to add email, phone number or both. The Category Slidedown is configurable through the dashboard for Typical Site setup and can also be configured via custom code.
|Learn more about Email & Phone Number Slidedown|
The subscription bell is a small widget that resides in the lower left or right corner of your site, which users can click to bring up the Native Permission Prompt for your site. It is designed to be small enough that you may keep it on your site at all times, and does not require users to dismiss it.
Simply add a snippet to your site's markup and it will be rendered as a button or link that triggers subscription flow when user chooses to subscribe. Provides good user experience. Can be customized through the dashboard at any time without changes to your site's code.
HTTPS sites may choose not to use a soft prompt and instead trigger the browser's Native Permission Prompt. However, immediately prompting users to subscribe with the Native prompt is being deprecated by the browsers and is not recommended.
Best practice is to delay the Slide or Native Prompt from showing on screen. Giving visitors time to browse your content before prompting can improve engagement and ensure the browser doesn't penalize your site.
You can delay prompts based on:
- page views: the number of times a page is viewed/loaded on the screen
- seconds: amount of time passed in a single page to show the prompt
Programmatically show the prompt anytime!
Use our SDK Prompting Methods to show the prompt with code.
Make sure to turn off the "Auto-prompt" option to call these methods.
Using the Typical Site Setup you can customize showing the Slide or Native prompt after X amount of seconds the user is on the site and/or after X amount of page views. For example, show the prompt 30 seconds after the user visits 3 pages.
If using Custom Code Setup, see examples for configuring prompt delays through OneSignal
WordPress requires some more steps shown in this guide on adding a delay to your WordPress Site.
If a user clicks "Block" (Chrome), "Don't Allow" (Safari), or "Never Allow" (Firefox) on the Native Permission Prompt they can never be prompted from the site again and must subscribe or reset permissions through a multi-step process through the browser settings. This is one reason it is recommended to use the OneSignal Prompts.
If a user clicks "X" on the Native Permission Prompt or "No" on the OneSignal Prompts, then the following occurs:
Chrome - You have 3 tries to get the user to subscribe, after the 3rd "X" click on the required native permission prompt, they will not get prompted again for a week. More on this Chrome feature here. For Chrome on Android, see Why is Slide Prompt Showing on Mobile.
Firefox - Beginning with Firefox 70 once a user clicks "X" they will need to click the small notification icon in the browser to be prompted again. Also, with Firefox 72+ the Native Browser Prompt is prevented from showing, see below Why do I see the Slide Prompt on Firefox when I want the Native Browser Prompt for more details.
The OneSignal Side Prompt will show after 3 days, 7 days, then 30 days if the user clicks "Allow" or "Cancel" on it and is still not subscribed.
For instance, if a user clicks "Allow" on the slide prompt, but "x" on the native prompt, it will not show again for 3 days the first time. After 3 days, it will show again and if the user clicks "Cancel" or "Allow" but "X" on the native prompt, it will not show again for 7 days. After 7 days if the user does this again, it will be every 30 days.
If the user clears cookies or browser data, the cycle resets.
For testing purposes, please follow Clearing your cache and resetting push permissions to access your site as a new first-time user.
It is best to ask visitors to subscribe after you have provided some value to them through the site. This could be after they have read your articles or in a "site settings"/"profile" page, and/or in your shopping-cart or check-out flow.
Common best practices include:
- Using a Delayed Slide Prompt.
- Embedding the Custom Link Prompt in the middle and/or at the end of the articles and within a "Subscription Page" or section of the user's Profile page if you have one.
- Adding the Bell Prompt to allow users to easily subscribe/unsubscribe throughout the site.
- If you add your own call-to-action buttons (like add to cart or subscription events) on the site or want to show the Native Browser Prompt anytime, use the
OneSignal.showNativePrompt();method. Your site must be HTTPS and did not select "My site is not fully HTTPS" in the OneSignal Site configuration.
You can put any language you like into the prompt. If you are trying to dynamically change the prompt language based on the page, then switch to the Custom Code Setup and initialize OneSignal based on the language of the page.
The Native Browser Prompt will automatically translate to the browser language settings.
Using the Custom Code Setup you can initialize OneSignal with the different prompting options. You would need to setup your own way to trigger the A/B/C/D etc tests which initialize OneSignal.
Make sure you are not in incognito mode, private browser mode or guest browser mode.
Yes! Please see our guide Auto-Segment By Subscription Page.
Apple still does not support Web Push on iOS like iPhone and iPad. This is an Apple limitation and no push provider can provide Web Push Notifications on iPhone and iPad. You need an iOS mobile app to send push on iPhone and iPad. GoNative.io is a great way to turn your website into a mobile app.
Also make sure you are using a browser and device that supports web push.
Check your prompt setup to make sure Auto-prompt is turned on and the Delayed Prompts are not blocking you.
Last would be to follow these steps to reset your cookie and browser cache to visit your site like a first-time user.
If you use Typical Setup, make sure to disable Auto-Prompt for both Slide and Native prompts. If you use the bell prompt, you will need to remove the OneSignal init call on pages you do not want the bell to show or switch to the Custom Code Setup.
You can now trigger the Native or Slide prompt with the SDK methods. See the prompt guide for details.
WordPress Users: There is currently no way to disable the OneSignal subscription prompts on certain pages/posts through the plugin directly. This will require adding code to the site.
We provide two options on how to setup the prompts on different pages of your site:
With Firefox 72+ there is a change that requires a user to click a button to show the native browser prompt. If you try to automatically show the native browser prompt, you will see an icon within the browser like this:
The user must click this icon to view the Native Browser Prompt on Firefox. This is why we default to the Slide Prompt on Firefox because it is more "eye-catching" and requires the 2-step opt-in in either case.
If you do not want to show the Slide Prompt as default, you must turn off the "Auto-Prompt" switch in the Prompt Editor:
Press "Save" and "Save" again on the next page. You can then use the
OneSignal.showNativePrompt() SDK method to trigger the Native Prompt on any page you want.
The reason for this behavior is due to a change that Google made on December 5th 2017 to Chrome on Android. It is a very user-unfriendly pop-up that we deliberately added the double prompt on Android to preventt your users from having a bad experience on your site.
For more details on this or if you really want to only show just the native prompt see Why is Slide Prompt Showing on Mobile.
If you are seeing the welcome notification and the slide prompt, then you could be doing the following:
- make sure you are not calling
- check that your init code does not have
- check that you are not triggering the slide prompt with
- check that you are not calling the native browser API for trigging the "native prompt" which is the
Updated 2 months ago