Sending web push notifications from a private domain

Web Push notifications are short messages displayed on a recipient’s device. They are a new, convenient, and fast way to communicate with customers. A notification consists of a small square icon, a title, and a short text, while the whole notification is a link directing to a selected website.

In SALESmanago web push notifications can be sent from the system. You can also send them from the domain where the consent was confirmed.

To configure a domain, go to

Web Push → Consent forms→ Configure your domain


Contents

1. Basic information

2. Configuring your own domain

3. Additional notes


1. Basic information

The experience of website visitors is affected by many factors. One of them is reducing distractions and unnecessary steps on the path to conversion. Setting up a custom domain will prevent the browser from displaying an additional window after confirming the consent form. It can positively affect the user experience (UX) of the website.


2. Configuring your own domain

If you do not want to display an additional window after confirming the consent form, add the proper files to your site. To do so:

  1. Go to Web Push → Consent Forms→ Configure your domain

Follow the commands listed one by one on the pop-up banner:

  1. Click Download files button.
  2. Extract the two files: manifest.json and sw.js.
  3. Upload files to the root directory and share it.
  4. Add the following code to a section on each page of your website where users can subscribe:

<link rel=”manifest” href=”/manifest.json”>

3. Additional notes

When configuring your own domain, keep in mind that:

  1. Your site must fully support HTTPS to use this feature. Consent forms will not display on HTTP pages.
  2. The native form will not display on a page without the sw.js file. Such a page will only display a graphical form (containing a Thank You Page) through which the signup occurs.
  3. The sw.js file does not need to be in the root directory. Just add a variable to the tracking code and provide the directory path where the sw.js file is placed.

EXAMPLE: Here is a sample configuration:

<script type=”text/javascript”>
var _smid = “epqdxascl3j176j1”;
var _smswdir = “/dir/to/sw.js”;
(function(w, r, a, sm, s ) {
w[‘SalesmanagoObject’] = r;
w[r] = w[r] || function () {( w[r].q = w[r].q || [] ).push(arguments)};
sm = document.createElement(‘script’); sm.type = ‘text/javascript’; sm.async = true; sm.src = a;
s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(sm, s);
})(window, ‘sm’, (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘salesmanagotest.ap.ngrok.io/static/sm.js’);
</script>

If you need more information about the topic mentioned above, please contact us: support@salesmanago.com +1 800 960 0640