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

Verify Invitation Display

Testing Tools

Tools used in this testing example are Chrome with Developer Tools (CTRL+SHIFT+I or F12). Internet Explorer, Firefox and Safari all have similar Developer Tools for testing.

General Testing Steps

  1. Clear cookies and cache. Tip: Some browsers, such as IE, have an option to "Preserve Favorites website data." Be sure this is not checked when clearing cookies in the event that the site being tested is a Favorite.
    1. Private browsing or Incognito - In Chrome CTRL+SHIFT+N opens a new incognito window so that you don't have to clear cookies or cache.
  2. Go to your website that contains the ForeSee 'staging' snippet.
  3. Adjust the survey triggering rules for your session In order to ensure that you receive a survey invitation, you'll have to use the testing tools to set sampling to 100% and select the Override Pooling checkbox.
  4. Visit a few pages. Take note of the Loyalty Factor (required page views) on the Survey Administration page, then either visit a few pages or reload the page to meet that page view requirement. Take care not to load the pages too quickly as it takes a little bit of time for the ForeSee code to load on each page. (The code loads after the DOM ready event so there may be a slight delay for the invitation to display).
  5. Invitation is displayed. Once you have visited the required number of pages, 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.

Test performance of Invitation Includes
Invitation includes are set requirements that must be met in order for a survey invitation to be eligible to appear.

They come in one of three forms:

  • Cookie name/value pairs
  • JavaScript variable name/value pairs (isAuthenticated = true)
  • URL parameters or partial values (&members=true or “/members/”)

To test the performance of these include rules you will use the survey testing tool (described in the Testing Web SDK article). (Make sure to use the steps here to test the invitation rules, as other methods of forcing a survey invitation may be specifically built to ignore include rules.)

To test the performance of a survey include, after resetting sample rates to 100%, visit pages that do not meet the include rule’s criteria. You should be unable to trigger an invitation regardless of the number of page loads triggered.

Then move to a page that does meet the include criteria. You should then see the survey invitation present.

Test performance of Invitation Excludes
Exclude rules function as the inverse of include rules (see above). They use cookie values, JavaScript variables, or URL patterns to suppress the invitation from presenting while met.

Testing for exclude behavior should therefore be handled with the same steps as testing include behavior. (see above)

While testing excludes, your expectation should be that the invitation will not appear on a page matching the exclude rules, but will appear on pages that do not.

  1. Accept the invitation. If testing on desktop, check to make sure the child (tracker) window opens. Depending on the browser type and version, the tracker may be positioned either in front or behind the parent window. (more details can be found in the Desktop Invitation Behavior article. The instructions on the window should provide instructions on how to navigate the window if it presents in front of the parent.
  2. Survey display. 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 sub-domain or protocol that does not contain the ForeSee code. Close the tab/browser of the site you are testing or travel to a different domain. In a few seconds, the tracker window will convert to the survey questionnaire.
  3. Submit a test survey. The survey questionnaires are hosted by ForeSee and tested prior to going live. If you want to submit a questionnaire as a test (without it being processed), append &4ctest=1 to the survey URL. Alternatively, you can prevent processing of a survey by triggering the two-thirds rule* described below. Note that test surveys will be erased once you go live. If a survey (or placeholder) does not open, please contact support.

* Two-thirds rule: A questionnaire (with a model) must have 2/3 of all measured questions (including Elements, Sat and Future Behaviors) answered with something other than “Don’t know” in order to be submitted successfully. Those surveys that don’t meet this rule are stored in different tables and are not part of your data set. (Note: we do not delete surveys with "straight line" responses, e.g., surveys with '1' selected for all responses).

Testing Customer Passed Parameters (CPPs)

Testing the collection of customer passed parameters (CPPs) requires us to replicate the site visit steps that would result in a CPP being populated with a value (for example: logging in to verify the setting of a CPP that tracks authentication). We can then observe the survey URL to verify collection.

To begin, first trigger a survey invitation:

  1. Then open the Console tab (1)
  2. Type FSR.showInvite(); into the console prompt and press enter (2)
  3. Accept the invitation that is shown for a survey. (3)

This will open a tracker window that should be left open until your site visit is complete. Take any actions on the website needed to trigger all CPPs that should be tested.

When testing is finished, close all windows that contain the website URL. Once all windows are closed, the tracker window will load the survey in approximately 5 seconds.

Allow the survey to load and then observe the URL. CPPs are written to the URL in the form &cpp[name]=value, so in the highlighted example below we see a cpp with the name locale set with the value en.

Mobile Testing Instructions

When using the mobile onExit method, a second invitation is presented immediately following the first. 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 on Mobile Testing

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 is 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. You only need to submit a survey if you have Replay and want to generate a test movie. If a survey (or placeholder) does not open, please contact support.

Troubleshooting questions

Check the following in the developer tools if you are having issues with the invite:

  • Is the code being loaded on the page?
    • Go to the Sources tab and look for gateway.foresee.com or gateway.answerscloud.com. Expand the folders to ensure files are being loaded.
  • Is the cookie being dropped?
    • Go to the Application tab, find the domain of the site you are testing and find a cookie with a name: _4c_
  • Is the page view count being incremented?
    • Go to the Console tab and enter the following: FSR.Storage.get('pv', function(s){ console.log(s)});. This returns the total number of pages viewed in your session.
  • Did the invitation display correctly? If not...
    • Were you on a page that is being excluded?
    • Are you meeting a different rule for being excluded?
  • Does your organization have special security settings?
    • If you are having trouble loading the invite, try using a phone or device on a non-work network. Some companies have special internal security / firewall restrictions which prevent the invite from appearing

In Session Survey Testing

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.

Testing Replay

If you have Replay, you’ll need to follow the Replay testing instructions as well. Take a look at the Verify that Replay is Working article for more details.

Verify Invitation Display