menu

SiteGenesis / Server-side JS / Module: request/OnSession

The onSession hook is called for every new session in a site. This hook can be used for initializations, like to prepare promotions or pricebooks based on source codes or affiliate information in the initial URL. For performance reasons the hook function should be kept short.

Source:

Methods

(static) onSession()

The onSession hook function.

Source:

(inner) getDeviceType() → {String}

Gets the device type of the current user.

Source:
Returns:

the device type (desktop, mobile or tablet)

Type
String