This is an old revision of the document!
Web Push Notifications sind Nachrichten, die an den Web Browser zugestellt werden. Der Nutzer kann sich hierbei auf einer beliebigen Website befinden. Wenn der Web Browser zur Zeit der Zustellung geschlossen ist, wird die Notification beim nächsten Öffnen angezeigt. Nachfolgend finden Sie eine Anleitung, wie Sie Opt-Ins für Web Push Notifications generieren können.
You will receive your personal SDK file from promio.net.
The following three files are included:
Include them on your main page (top-level domain). The URLs of the uploaded files should then look like this:
To collect web push opt-ins on your website you need to insert a code into the <head> of your page. The code will be given to you by promio.net.
Your code will be personalized. The example below serves as an illustration.
<html> <head> <link rel="manifest" href="./manifest.json"/> <script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script> <script src="https://api.promio-connect.com/sdks/webpush.js" async=""></script> <script> var OneSignal = window.OneSignal || []; var promio = window.promio || []; OneSignal.push( function () { promio.push( function () { promio = new promio.WebPush(); OneSignal.init( { appId: "{onesignalAppId}", notifyButton: { enable: true, }, } ); promio.init( { senderId: "SENDER_ID", autoRegister: false } ); promio.identifyUserByMail("foo@bar.de"); promio.initSubscription(); } ); } ); </script> </head> </html>