Getting Invitation Status

Getting Invitation Status Use Case

Before you show your overlay with an advertisement, check to see if the ForeSee invitation has been shown, so you're not showing 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 PRESENTED, 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.

351351