Delay Slide Prompt OneSignal after a few seconds
-
Hi, we have found this code at onesignal website, for delaying the promp notification at wordpress, but doesn′t explain where should this code be inserted. We have tryed to inser it at header, but then front-website gives error. Could you please explain how to place this code (?where?).
In the explanation at onesignal website (code explamples), doesn′t explains it:
https://documentation.onesignal.com/docs/wordpress-customizations#how-do-i-delay-prompting-users
We are facing terrible problems, as the PRIVACY POLICY shows up at mobiles, but at same time the onesignal promp notification and doesn′t let accept any of them, because they they overlap, so clients leave the site.
Please help needed urgently, as we can go foward with our business.
// Delay Only Example setTimeout(function(){ console.log("about to initialize OneSignal"); window._oneSignalInitOptions.promptOptions = { slidedown: { prompts: [ { type: "push", autoPrompt: true, text: { /* actionMessage limited to 90 characters */ actionMessage: "Your Custom Action Message", /* acceptButton limited to 15 characters */ acceptButton: "Yes", /* cancelButton limited to 15 characters */ cancelButton: "No", }, delay: { /* seconds to wait for display */ timeDelay: 1, /* # pageviews for prompt to display */ pageViews: 1, } } ] } } window.OneSignal = window.OneSignal || []; window.OneSignal.push(function() { window.OneSignal.init(window._oneSignalInitOptions); }); }, 3000);
- The topic ‘Delay Slide Prompt OneSignal after a few seconds’ is closed to new replies.