recordAction()
Overview
public string function recordAction(
required string action
, required string type
, string userId = ""
, string identifier = ""
, any detail
)
Records an action for the given user
Arguments
Name | Type | Required | Description |
---|---|---|---|
action | string | Yes | ID of the action to record, e.g. 'logout' |
type | string | Yes | Type of the action to record, e.g. 'login' |
userId | string | No (default="") | ID of the user to record the action for |
identifier | string | No (default="") | Unique identifier to the subject of the action, e.g. a page ID for a 'pagevisit' action |
detail | any | No | Additional detail to record with the action, will be serialized to JSON when saved in the DB |