ForeSee Developer Portal

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

Verify Invitation Display


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.

Code version: 19.3.2

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. Set sampling to 100%. Using the [#acscommand=fstest](doc:testing-client-code) test page, enter 100 in the sampling percentage box which will override the sampling for the test.
  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 (see Tip below).
  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.
  6. Accept the invitation. Does the child (tracker) window open? 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.
  7. 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.
  8. Submit a test survey (optional). 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. If you do want to submit a questionnaire, answer the questions as if you were really taking the survey. Otherwise, the survey may not be submitted because of the two-thirds rule*.


* 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. Therefore, when testing the submission of CPPs, if you answer "Don’t Know" to the measured questions, we do not have the delete the respondent afterwards since the data does not impact your data.


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.

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 (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 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
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 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.

Verify Invitation Display