API: Manage Visitor Sessions

This API allows you to manage a user session in the Remote Management Server.

Requirements

Kiosk Pro Enterprise

  • Integration of our JavaScript API into your webpage
    • Sample code to run within the app and download for integration into your own project is available here.
    • Best practices for working with the JavaScript API are available here.
  • App Settings
    • Content > JavaScript API > Access JavaScript API = By Import
    • Remote Management Server
      • Enable Remote Management Server = On
      • Site Name, Kiosk Name, & Unit Name = all filled in correctly.


Triggers via API Functions

Add Navigation Event to Current User Session

This function adds a URL and page title to the navigation history for a current user session in the Remote Management Server, allowing you to track events that would not otherwise be reflected in the navigation history (like an AJAX form submission, for example). This navigation event will last until another navigation event occurs or the session is closed.

Format
kp_KioWare_registerNavigation(url, title, callback);
		
Parameters
  • url = [string] defines the URL of the event to be saved in the navigation history for the current user session.
  • title = [string] defines the page title of the event to be saved in the navigation history for the current user session.
  • callback = [string] name of callback function to be called.
Callback format
callback(success);
		
Callback return values success = if defined, the function successfully triggered and saved an event in the navigation history.


End Current User Session

This function allows you to manually end a user session in the Remote Management Server without triggering the idle timer or redirecting to the homepage. This may be useful if the project does not use the app's native idle timer (as that is generally what triggers the close of a user session).

Format
kp_KioWare_closeCurrentSession();
		


Sample Code

  • This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.
  • To run sample code, set the app's homepage to https://kioskgroup.com/rms-session-api
  • To download a .zip of sample code, click here.

Change Log

  • Added ability to end a visitor session in 7.3 version. Added ability to add a navigation event in 7.6 version.

Still stuck? How can we help? How can we help?