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 technical team to install the web-push code.

Here are the steps for Web-Push installation:

  1. Enter the ‘Campaign’ > ‘Push Campaign’ menu.
  2. Click the ‘Setting’ button.
  3. Scroll to the Web Push Script section. You will add 2 scripts, HTML and Javascript.
  4. Copy the HTML code into your web editor, then paste the code into the header after the < head > tag (No spaces).
  5. Then, you need to install javascript. First option, you can directly import the file into your serviceworker.js file. Second option, you can download the javascript file here. Then install the file in your root or public project directory with the file name serviceworker.js

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!


The latest tutorials sent straight to your inbox.