Legacy Trigger Code (<18x) - Implementing ForeSee for Web

Clients are provided a JavaScript library to be hosted on their web or content server. This library contains JavaScript, HTML, CSS, images, and one .swf file. The purpose of this JavaScript library is to present a survey invitation to site users based on the configured requirements. Once a site user has become eligible, based on those requirements, the code then presents the survey invitation and subsequent survey questionnaire (hosted by ForeSee) to the site user.

In most cases, the ForeSee Implementation Team has worked with the client and possibly a Technical Contact to pre-configure the JavaScript library so that there are minimal changes required to implement this code.

Some of the pre-configured requirements are:

  • When and where to present an invitation
  • Where to prevent an invitation from appearing
  • How frequently to present the invitation
  • The look and feel of the invitation

This library may also contain logic to collect additional client specific data points that are available on the site to be passed along with the survey results through the use of Customer Passed Parameters (CPPs).

The basic implementation is simple:

  1. The client loads ForeSee files delivered in a .zip file to the web or content server.
  2. The client modifies the ‘files’ path in the JavaScript files to point to the proper location of the hosted files.


    It is recommended to change the path in the following JavaScript files: foresee-alive.js, foresee-test.js, foresee- tracker.js, foresee-trigger.js, and foresee-qualifier.js (if applicable).

  3. The client adds a single line of JavaScript to their pages (with the path pointing to the proper file location): <script type="text/javascript" src="/foresee/foresee-trigger.js"></script>.
  4. The client tests the code to ensure the survey functions as expected.

Things that may impact implementation and require additional effort:

    • Separating Trigger Code by type
    • Separating Trigger Code files by Environment
    • Hosting the code from a third party domain
    • Using a tag manager
    • Changing sampling parameters
    • Adding to the exclude list
    • Adding new customer passed parameters

The most common implementation issues:

    • Invite not displaying? Check the code, check cookies, check ‘files’ paths, and check pooling.
    • Tracker frozen, survey is not presenting? Check ‘files’ paths.
    • Text boxes are missing on the test page (fsrtest.html)? Check ‘files’ paths.
    • When in doubt please feel free to contact the implementation team.

Code is working but survey looks like it’s a placeholder? Survey is not completed or mapped yet.

Other articles in this section:

  1. Implementing ForeSee for Web (current article)
  2. Implementation Steps
  3. Testing & Troubleshooting
  4. Survey Options
  5. Code File Library
  6. Performance Optimization
  7. Trigger Specifications
  8. ForeSee Replay Specifications
  9. Replay Privacy Options
  10. 508 & WCAG Compliancy