In this article, we will walk through the required steps to add the provided JS snippet to your Wordpress site.
Please Note: You'll be required to publish a setup file to the root directory of your website to properly facilitate Web Push Notifications. Since Wordpress does not provide access to this directory, you'll need to host your page through a hosting platform.
Web Push Notifications allow you to send timely updates to your website visitors who have opted-in to receive them. You can use these notifications to promote a specific article or blog post, or alert visitors about new products and sales. They can ultimately help boost engagement with your site.
Step By Step Instructions
- You'll first need to install and activate a Wordpress plugin that provides access to the source of your pages. We recommend using Header Footer Code Manager. Once you have installed this, or a similar plugin, you should see it displayed in the lefthand column of your Wordpress page.
- Click 'Add New' under the displayed menu item.
- On the following page you'll find settings that can influence how this snippet is applied to your various Wordpress pages. In these settings, you'll need to make sure you set 'Location' to 'Footer' in the provided dropdown menu.
- Paste the provided JS snippet into the designated area within your plugin and click 'Save'.
And that's it! You've successfully added the provided JS snippet into your Wordpress site. Make sure you finish setting up Web Push Notifications for your site by adding your setup file to your website's root directory.