ForeSee Developer Portal

Everything you need to set up and optimize your ForeSee product. Home of developer documentation, implementation guides, and question/answer forums.

Blueprint

On-Premises Deployment

Overview

The ForeSee On-Premises Deployment option gives you the ability to host all of the ForeSee product files on your internal servers. CX Measure, Replay, and Feedback are all available in the On-Premises Deployment.

With the On-Premises Deployment, you also have the ability to make changes to product configurations through CX Suite. Note: Configuration changes outside of CX Suite can only be done by the support team (e.g., sampling percentage, loyalty factor, invite excludes, etc.).

Installation

Set up of the On-Premises deployment has two steps:

  1. Hosting of the product files on an internal server.
  2. Placing of the ForeSee embedded code snippet on your web pages.

Step 1: The Support team send the product files as a zipped email attachment for hosting on your website.

Step 2: Below is the snippet of HTML that you need to add to your website template. This needs to appear on every page of your website, ideally in the <HEAD> area. Don't forget to include it on special areas of the site like in the checkout process and 'logged in' areas.

The snippet can also be added with a tag manager if desired. For details refer to the article on Using Tag Managers to Add the Embed Snippet.

See the example STAGING embedded snippet below. Your snippets will come in the zip folder delivered to you by ForeSee. The file names to look for are:

  • sampleselfhost_page_production.html
  • sampleselfhost_page_staging.html

On-Premises Embed Snippet

Below is an example of the ForeSee On-Premises snippet to be used for a STAGING environment.

The "data-environment" attribute inside the snippet determines which environment to use. For PRODUCTION use the snippet from the sampleselfhost_page_production.html file (in which the "data-environment" attribute is set to ‘production’).

You'll may also need to update the values in the "data-codelocation" and "data-product-assets" to reflect the location where you host the ForeSee files

<script type="text/javascript">
    // Instructions: please embed this snippet directly into every page of your website template.
    // For optimal performance, this must be embedded directly into the template, not referenced
    // as an external file.

    // ForeSee Embed Script v2.00
    // DO NOT MODIFY BELOW THIS LINE *****************************************
    ;(function (g) {
      var d = document, am = d.createElement('script'), h = d.head || d.getElementsByTagName("head")[0], fsr = 'fsReady',
        aex = {
          "src": "gateway.min.js",
          "type": "text/javascript",
          "async": "true",
          "data-vendor": "fs",
          "data-mode": "selfhost",
          "data-environment": "staging",
          "data-hasssl": "true",
          "data-client": "[sitekey]",
          "data-codelocation": "/foresee_assets/code/19.3.3-v.2/",
          "data-isselfhosted": "true",
          "data-product-assets": "/foresee_assets/product_assets/",
          "data-role": "gateway"
        };
      for (var attr in aex){am.setAttribute(attr, aex[attr]);}h.appendChild(am);g[fsr] = function () {var aT = '__' + fsr + '_stk__';g[aT] = g[aT] || [];g[aT].push(arguments);};
    })(window);
    // DO NOT MODIFY ABOVE THIS LINE *****************************************
</script>

Embed snippet for http sites

If your website has http pages, you'll need to make a change to one line of the embed snippet.

Change "data-hasssl":"true", to "data-hasssl":"false",

Code Hosting Diagram

This diagram shows how the various files involved in the On-Premises Deployment are hosted. Note that the ForeSee configuration files are pure data only and clients host all of the product files on their internal servers.

On-Premises Deployment