Wordpress Installation

PLEASE READ:
You will need a Business Plan if you are hosting your website on WordPress.com.  This is the only way to be able to add the necessary javascript to your website.

 

Integration steps

Sites using Wordpress will need a different script compared to the script given via the admin tool. Listed below are the before and after version of the script needed to get Hovr up and running. You can copy and paste the code displayed in the after section directly into your global plugin section or anywhere else you are able to add in custom snippets of code. The only thing you will need to change is the siteId value. The siteId is found within your Hovr code.

 

Code Before:

<script id="hio-script-identifier" defer src="https://script.gethovr.com/bundle.js" data-id="{siteID}"></script>
 

Code AFTER:

(function(d, id) {
let hovr;
hovr = d.createElement('script');
hovr.id = id;
hovr.setAttribute("data-id", "siteID");
hovr.defer = true;
hovr.src = 'https://script.gethovr.com/bundle.js';
d.head.appendChild(hovr);
}(document, 'hio-script-identifier'));

 

Beside "Code Type", select "JavaScript Snippet" from the drop down menu. Your code preview section should look like this after Hovr installation: 

code-snippet (1)

 

Additionally, some site configurations will need <script> </script> opening/closing depending on the unique site setup. 

Why do I need a different code?

When Wordpress serves up the content it will occasionally overwrite the src value in our script which is needed to run our code. When that value gets overwritten it is impossible to download the necessary code Hovr needs to run.