ForeSee Hosted Code - Self Hosting Code

It’s possible (though not usually recommended) to self-host ForeSee’s JavaScript and CSS along with your other website files. When you request this, your technical contact at ForeSee will email you a link to a ZIP file containing all the files you’ll need. Here’s an example of what the contents of this file might look like:

Self-hosted ZIP Contents

The file gateway.min.js and the folder foresee need to be placed somewhere on a web server in the same relative folder structure. In other words, wherever you put gateway.min.js, the folder foresee needs to be a direct descendent of that folder containing that file, just as it appears in the ZIP.

Next, you need to add the HTML embed snippet to your website template. The file embedsnippet.html contains your snippet. This should be placed in the head portion of your HTML template. Before you do this, you need to replace the text [LOCATION OF GATEWAY.MIN.JS] with the actual URL location of gateway.min.js.

Note: It’s important that you remove all copies of older foresee code from your template before deploying the embed snippet. Look for SCRIPT tags with “foresee” in the “src” attribute.

Other articles in this section:

  1. Security & Reliability
  2. Deployment Options
  3. The Embed Snippet
  4. Self Hosting Code (current article)
  5. Calling API Methods