trackAction
Send User actions.
Overview
The trackAction
method is called when the user does something. For events related when something is seen or rendered to the user, see trackImpression
Method Signature
trackAction(action: ActionTrackEvent): void;
Parameters
Parameter | Type | Description |
---|---|---|
action | ActionTrackEvent | A union type of action events. This includes things like key_plays_clicked or bets_clicked |
Return Value
Does not return a value.
Example
export type PanelClickAction = {
name: string; // key_plays_clicked
e0_kingdom: 'panel';
e1_phylum: 'engage';
/**
* Panel Type
*/
e2_class: string;
/**
* Panel ID.
*/
e3_order: string;
/**
* Panel Name
*/
e4_family: string;
/**
* Additional metadata for the panel click action.
*/
metadata: Metadata;
};
export type ActionTrackEvent = (
PanelClickAction |
// other types of User Actions
);
class Delegate implements IMaestroEventDelegate {
trackAction(action: ActionTrackEvent) {
console.log('[Analytics Action Event]', action.name);
}
}