analytics
const analytics: { logEvent: void;};Defined in: domains/analytics.ts:73
Type Declaration
Section titled “Type Declaration”logEvent()
Section titled “logEvent()”logEvent( category, action, uri, data?, method?): void;Track a custom analytics event.
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
category |
string |
undefined |
Event category (e.g. 'data-capture', 'share'). |
action |
string |
undefined |
Event action (e.g. 'submit', 'open'). |
uri |
string |
undefined |
The URI or name that identifies the subject of the event. |
data? |
unknown |
undefined |
Optional payload attached to the event. |
method? |
string |
DEFAULT_METHOD |
Internal tracking method; defaults to 'trackevent'. |
Returns
Section titled “Returns”void
Example
Section titled “Example”mobilelocker.analytics.logEvent('product', 'view', '/slides/overview', { productId: 42 })