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.
Methods
(static) onSession()
The onSession hook function.
(inner) getDeviceType() → {String}
Gets the device type of the current user.
Returns:
the device type (desktop, mobile or tablet)
- Type
- String