OneSignal integration

Last updated: March 26, 2021 Written by: Avatar Marta Szeliga
share
Table of contents
share
Table of contents

OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages for 800k marketers & developers, delivering 5+ billion messages daily on their behalf. OneSignal's easy to implement, easy-to-use features include segmentation, A/B testing, automated messaging, and advanced analytics. Offering simple plugins and robust rest API endpoints, drive results. From this manual, you will learn, how to integrate it with the Landingi platform.

Enable custom code in OneSignal

1. Log in to the OneSignal platform, then add the domain on which the landing page is selected by you.

2. In the Configure Web Push window, select Custom Code, then in step 2 enter the name of the landing page and its URL address and click Save.

Install the code in Landingi

1. Below you will find the code that you need to copy and paste in the JavaScript codes tab in Landingi platform.

Remember: customize the code for your landing page.

  • (1) ID;
  • (2) Label for your landing page;
  • (3) Notification;
  • (4) Accept button text;
  • (5) Cancel button text.

Customize and copy the following code:

<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>

<script>

var OneSignal = window.OneSignal || [];

OneSignal.push(function() {

OneSignal.init({

appId: "xxxxxxxxxxxxxxx",

subdomainName: "your_label", /* The label for your site that you added in Site Setup mylabel.os.tc */

promptOptions: {

 /* actionMessage limited to 90 characters */

actionMessage: "We'd like to show you notifications for the latest news and updates.",

/* acceptButtonText limited to 15 characters */

acceptButtonText: "ALLOW",

/* cancelButtonText limited to 15 characters */

cancelButtonText: "NO THANKS"

}

});

OneSignal.showSlidedownPrompt();

});

</script>

2. Log in to Landingi platform and go to the Dashboard of the selected landing page. In the JavaScript codes tab, paste the previously copied code to the Head section and click Add code.

share

Was this manual helpful?