We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instead of displaying prompt right away to the new visitor, would like to display it after X pageviews, to be less intrusive.
Using the following for OneSignal:
jQuery(document).ready(function($) { window.OneSignal = window.OneSignal || []; var numVisitsTrigger = 3; /* Number of page visits before prompting user */ window.OneSignal.push(function() { var numVisits = new Number(localStorage['numVisitsTrigger'] || 0); numVisits += 1; localStorage['numVisitsTrigger'] = numVisits; if (numVisits >= numVisitsTrigger) { promptAndSubscribeUser(); } }); function promptAndSubscribeUser() { window.OneSignal.isPushNotificationsEnabled(function(isEnabled) { if (!isEnabled) { // Show Slide Prompt window.OneSignal.showSlidedownPrompt(); } }); } });
The text was updated successfully, but these errors were encountered:
This is part of the improvements to the permission prompt, adding it to the backlog. Thanks! :)
Sorry, something went wrong.
This has been released in v1.3.1
v1.3.1
Successfully merging a pull request may close this issue.
Instead of displaying prompt right away to the new visitor, would like to display it after X pageviews, to be less intrusive.
Using the following for OneSignal:
The text was updated successfully, but these errors were encountered: