1. Home
  2. Docs
  3. Push Boss Pro – Version 1 – Users Manual
  4. Creating and Managing Domains
  5. Configuring a New Domain

Configuring a New Domain

To setup a new domain to use push messaging you will need to follow these steps. If you get confused with any step, contact support for assistance. Make sure you include the exact step you are having problems with in the support ticket.

The first step you will need to do is to create the needed support files and download the zip file containing them to your local computer.

To display a list of all domains in Push Boss Pro™, click on “List Domains” in the “Domains” sub menu.

You can use the search box to locate a specific domain you want to configure. You can also sort on each column by clicking on the header cell of the column. You can reverse the order by clicking on the header cell a second time.

You will see a button named “Download” in the “JS Files” column for the domain you will be configuring. Click this “Download” button. A new page will display where you can create the needed files and download them.

Click the “Create ZIP File” button. The page will refresh once the zip file has been created.

Right click the “ZIP File” link to download the zip file containing the needed configuration files.

Please note that each time you create a zip file, the current zip file will be overwritten.

DO NOT USE A ZIP FILE CREATED FOR A DIFFERENT DOMAIN! IT WILL NOT WORK.

Now that you have the zip file downloaded to your local computer, you will need to unzip the file.

Inside the zip, you will find the following files.

firebase-messaging-sw.js
manifest.json
push-boss-pro.js

You will need to upload these three files to the root folder (public_html folder) of the domain you are adding.

Once these files have been uploaded, you will need to add some HTML to any page you would like the subscribe to notifications box to load when a person navigates to the page.

You will need to add the following lines of HTML between the <body> tags of the page you want the subscribe pop-up to load when a visitor navigates to the page. The best place to add them is just below the opening <body> tag of the page.

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script>
<script src=”https://www.gstatic.com/firebasejs/5.9.0/firebase-app.js”></script>
<script src=”https://www.gstatic.com/firebasejs/5.9.0/firebase-messaging.js”></script>
<script src=”push-boss-pro.js”></script>

The last line needs to point to the push-boss-pro.js script you uploaded to the domain. So, if the page you want to have the subscribe box load is in a folder, adjust the path appropriately.

To pop-up the subscribe box only when a button is clicked, use HTML code similar to the following on the page.

<button onclick=”requestPermission()”>Request Permission</button>

If you want the subscribe box to load automatically when a visitor reaches the page, add the following to an on page load javascript event or similar javascript event. Basically, you want to call this line automatically once the page is fully loaded.

RequestPermission()

You can also un-comment the last line of the push-boss-pro.js script to load the subscribe box immediately. The line to un-comment looks like this.

// requestPermission();

Just remove the two forward slashes so it looks like this.

requestPermission();

The above steps may look confusing and seem difficult. Once you have completed the process once it becomes extremely easy to follow the process again. So don’t scream and pull your hair out. Contact support if you get stuck on a step.

Was this article helpful to you? Yes No 2