Edgemesh installation Instructions for Magento ECommerce.

In order to install Edgemesh on Magento, please ensure your site meets the Prerequisites before continuing. The instructions below are for Magento 2.

Install the Service Worker

Installing the Edgemesh Service Worker is a fairly straight forward process:

First you will need to create a file in the root of your web server. Often times the root is www/html but if your root is different you can find it quickly by locating the main index.php of your Magento installation.

Once you find the root directory, create a file called sw.js and add the following code:


Install the Client

Now that your Service Worker is installed, you can navigate to your Magento admin and go to Content > Configuration :

Then click edit on your active store view:

Scroll down to Other Options > HTML Head and find the Scripts and Style Sheets input. Add the following code to the input.

If there are other scripts or style sheets in the input, be sure to add the Edgemesh Client code on a new line.

onload="window.edgemesh = new Edgemesh()">

It should look something like this:

Click Save Configuration on the top right and can now complete your installation by verifying your domain on the Edgemesh Portal.