SDK Extension Points - Getting Invitation Status

Getting Invitation Status Use Case

  • Before the client shows their overlay with an advertisement, they want to first check to see if the ForeSee invitation has been shown, so they don’t show multiple overlays to the same visitor.
Note: This API function is available in code version 19.3.2 and above.

Set the callback result to a variable.

 

FSR.getState(function (s) {
window.fs_state = s;
});

Has the invitation been displayed? Results return TRUE or FALSE.

 

window.fs_state.didInvite;

If the invitation has been shown, was it ACCEPTED, ABANDONED, DECLINED?

 

Note: This returns null if the invitation has not been shown.
window.fs_state.inviteSituation;

Test with Developer Tools

Using the developer tools that come with most browsers, you can test this progression.

Other articles in this section:

  1. Getting Invitation Status (current article)
  2. API Event Hooks