How to Install a Web Push Script

Here you will learn about how to install web push on your web to integrate with MTARGET. It is important to know, the steps written here may be different from those on your website system. However, this tutorial has been made as general as possible, so if there are differences when installing the code on the website system, we recommend contacting your engineering team to help install the web-push code.

Here are the steps for a Web-Push installation:

  1. Enter the ‘Campaign’ > ‘Push Campaign’ menu.
  2. Click the ‘Setting’ button.
  3. Scroll to the Web Push Script section. Here you will add 2 scripts, HTML and Javascript.
  4. In the first, you will be installing the HTML code into your web editor. Copy the code, then paste HTML code to header after < head > tag (No spaces).
  5. Second, you will install javascript. Download the serviceworker.js here file, then save. Put this serviceworker.js file in the root or public directory on your website.

If all the steps above have been fulfilled, you should have successfully installed the web-push script on your website. To check it, you can do a hard reload (CTRL+F5) on your website. If an opt-in notification appears to block or allow, the script has been successfully installed.

Was this article helpful?
Let's See How They Improved By Using Our Products
Learn how our customers increase their leads and revenue through personalization and many other features. Check their stories!
×

Subscribe

The latest tutorials sent straight to your inbox.