Testing & Troubleshooting - Verify Survey is Working
Tools used in this testing example are Firefox with add-ons: Firebug, Firecookie, and JSView. Internet Explorer 8 +, Chrome, and Safari have similar tools.
- Clear cookies and cache. In some browsers, such as IE, clearing cookies can be difficult.
Be sure “preserve favorites” is not checked when clearing cookies, the site being tested is likely a “favorite”.
- Get a survey invitation to appear. Using the
fsrtest.htmltest 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 (see Figure 1 – Survey Test Page).
- 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.
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:
- Search for ‘trigger’ to locate a reference to
- Confirm that both the
foresee-surveydef.jsfiles have been loaded * (The
foresee-trigger.jsfile dynamically loads the
- Search for ‘trigger’ to locate a reference to
- Ensure the following cookie is loaded: fsr.s – this is our session level cookie. The contents should look similar to:
- Verify cookies and cache have been cleared.
- There should not be a persistent fsr.r cookie set to the domain.
- 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.
- Clear cookies and try again if either of these situations are true.
Here are some invitation 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).
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:
This fsr.r cookie must be cleared after each test to receive another invite.
- Accept the invitation
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).
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.
- Enter an email address or telephone number into the box and submit.
- Navigate away from the website by closing the browser or go to another domain.
- 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.
- 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.htmlfile launches in a new window. This window is used to monitor the parent window and display the questionnaire when an exit condition occurs.
- 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.
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.
- 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-trigger.jsfile is NOT loaded in this window.
If these files have not been loaded, the ‘files’ path in the
foresee-tracker.jsmay be configured incorrectly causing the tracker to freeze and unable to load the survey.
- 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.
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:
- Verify Survey is Working (current article)
- Verify Replay is Working