You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
846 B
44 lines
846 B
4 years ago
|
/* typehints:start */
|
||
|
import { Application } from "../application";
|
||
|
/* typehints:end */
|
||
|
|
||
|
export class AnalyticsInterface {
|
||
|
constructor(app) {
|
||
|
/** @type {Application} */
|
||
|
this.app = app;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Initializes the analytics
|
||
|
* @returns {Promise<void>}
|
||
|
*/
|
||
|
initialize() {
|
||
|
abstract;
|
||
|
return Promise.reject();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Sets the player name for analytics
|
||
|
* @param {string} userName
|
||
|
*/
|
||
|
setUserContext(userName) {}
|
||
|
|
||
|
/**
|
||
|
* Tracks a click no an ui element
|
||
|
* @param {string} elementName
|
||
|
*/
|
||
|
trackUiClick(elementName) {}
|
||
|
|
||
|
/**
|
||
|
* Tracks when a new state is entered
|
||
|
* @param {string} stateId
|
||
|
*/
|
||
|
trackStateEnter(stateId) {}
|
||
|
|
||
|
/**
|
||
|
* Tracks a new user decision
|
||
|
* @param {string} name
|
||
|
*/
|
||
|
trackDecision(name) {}
|
||
|
}
|