Testing - Verify the Survey is Working

Note
Tools used in this testing example are Firefox with add-ons: Firebug, Firecookie, and JSView. Internet Explorer 8 +, Chrome, and Safari have similar tools.

  1. Clear cookies and cache. In some browsers, such as IE, clearing cookies can be difficult.

    Tip
    Be sure “preserve favorites” is not checked when clearing cookies, the site being tested is likely a “favorite”.

  2. Get a survey invitation to appear. Using the #acscommand=fstest test page, enter 100 in the sampling percentage box to set a cookie which overwrite the sampling for the test. For SessionReplay clients, check the override pooling option. Take note of the Loyalty Factor (required page views), then either visit a few pages or reload the page to meet the page view requirement. The page view requirement is listed on the test page under Loyalty Factor.
  3. Load a page that contains the ForeSee code. When navigating to a page equal to the number specified as the Loyalty Factor (assuming 100% sampling) the expected behavior is for an invitation to display. If sampling is less than 100%, it is possible to receive the invite on any page once the Loyalty Factor requirement has been met.

Tip
Do not reload pages too quickly. The code loads after the DOM ready event so there may be a slight delay from the time a page is opened to the invitation displaying based on page load time.

If no invitation with 100% sampling when meeting the Loyalty Factor requirement:

  1. View source and verify the JavaScript references are on the page (see Step 3 above) and are being loaded correctly.
    1. Search for ‘trigger’ to locate a reference to foresee_trigger.js.
    2. Confirm that both the foresee_trigger.js and foresee_surveydef.js files have been loaded * (The foresee_trigger.js file dynamically loads the foresee_surveydef.js after the DOM Ready event.) *It is recommended to review the content of each file to ensure that the JavaScript has been called correctly and is not displaying the HTML for a 404 file not found page. A 404 may occur if the assets are not in the location which the ‘files’ path references in each of the JavaScript files.
  2. Ensure the following cookie is loaded: fsr.s – this is our session level cookie. The contents should look similar to:
    {"v2":-2,"v1":1,"rid":"d036702-53702257-2645-8fd6-921ea","to":3,"c":"http://www.clientsite.com/","pv":1,"lc":{"d0":{"v":1,"s":true}},"cd":0,"sd":0,"l":"en","i":0}
  3. Verify cookies and cache have been cleared.
    1. There should not be a persistent fsr.r cookie set to the domain.
    2. The fsr.s cookie should not have an “i” value of 1 or -1. If it does, the invitation has displayed (or attempted to) previously and no invitation is presented.
    3. Clear cookies and try again if either of these situations are true.

Here are some invitation examples:

Invite examples

When the invitation is displayed, the fsr.r (repeat days) cookie is dropped. This cookie prevents a user from being invited again for X days (default 90).

Tip
If the repeat days is set to have a different number of days for a user declining, the value changes when they decline. The value of the fsr.r cookie looks similar to the following:

fsr.r {"d":90,"i":"1292956831475_954940","e":1293563385893,"s":1}

This fsr.r cookie must be cleared after each test to receive another invite.

  1. Accept the invitation

    Tip
    Once the invitation is accepted, there is a value in the fsr.s cookie “i”:1. If the invitation is declined, the value is:”i”:-1. This setting indicates that there has already been an invitation displayed, if the “i” value is set to 1 or -1 the fsr.s cookie must be cleared to receive another invitation.

  • In Session Survey (Desktop and Mobile)
    When using an “in session” method to present the survey, the questionnaire displays immediately after accepting the invitation. At this point In Session Testing is complete. The survey questionnaires are hosted by ForeSee and tested prior to going live so there is no need to submit a survey to complete the testing of the code. If a survey (or placeholder) does not open, please contact Support.
  • OnExit Survey (Mobile)
    When using the mobile onExit method, a second invitation (figure 2c) is presented immediately following the first (figure 2b). The second invitation provides a place for the user to enter either an email, phone number, or both (Text messaging is currently only supported for US and CA).

    Tip
    Testing mobile must either be on a mobile device OR overwriting the browsers’ user agent on the desktop to appear as a mobile device. Otherwise the mobile invitation does not display on the desktop.

    1. Enter an email address or telephone number into the box and submit.
    2. Navigate away from the website by closing the browser or go to another domain.
    3. After a configurable period of time (configured by ForeSee, default five minutes) a survey link should be texted or emailed to the address or number entered. Click through the link to open the survey.
    4. At this point Mobile (Phone & Tablet) OnExit testing of the code is complete. The survey questionnaires are hosted by ForeSee and tested prior to going live so there is no need to submit a survey to complete the testing of the code. If a survey (or placeholder) does not open, please contact Support.
  • OnExit Survey (Desktop)
    When using the desktop “onExit” method to present the survey, the tracker.html file launches in a new window. This window is used to monitor the parent window and display the questionnaire when an exit condition occurs.
  1. Observe the Tracker Window. Depending on the browser type and version, the tracker may be positioned either in front or behind the parent window. The verbiage on the window should provide instructions on how to navigate the window if it presents in front of the parent.

    Note
    In IE, a Hide This Window button may display on the tracker. This is likely not visible on other browsers unless future browser updates allows for the functionality.

    When the tracker is opened the fsr.a cookie should have loaded and its value should continue to be updated. The fsr.a cookie is the trackers’ timer. Its purpose is to actively monitor the parent window to determine when the user leaves the site. Once this cookie loses its connection to the parent the survey loads within the tracker window.

    Tracker2

  2. Invoke an Exit Condition. Exit conditions happen when the following events take place: (1) closing the parent browser, (2) navigating to a different domain in the parent browser, (3) navigating to a different subdomain or protocol that does not contain the ForeSee code. The following files should have been loaded in the tracker window:
    • foresee_tracker.js
    • foresee_surveydef.js

    Note
    The foresee_trigger.js file is NOT loaded in this window.

  3. Tracker loads the survey. At this point Desktop OnExit testing of the code is complete. The survey questionnaires are hosted by ForeSee and tested prior to going live so there is no need to submit a survey to complete the testing of the code.

    Note
    Some browsers have settings which do not allow the tracker to gain focus forward when changing domains, in these cases navigation back to the survey must be done manually. In Chrome, an alert box is used to pull the window forward. As new browsers and versions are released this behavior may vary. If a survey (or placeholder) does not open, please contact Support.

Other articles in this section:

  1. Verify the Survey is Working (current article)
  2. Verify that Replay is Working