Expand all

MediaWikiMetricsClientIntegration

Adapts the MediaWiki execution environment for the JavaScript Metrics Platform Client.

See Metrics Platform on Wikitech.

Constructor

new MediaWikiMetricsClientIntegration() #

Methods

clone(obj) → {Object} #

Clones the object deeply.

Parameters:

Name Type Description
obj Object
Source:

Returns:

Type
Object
Clones the object deeply.

getContextAttributes() → {Object} #

Gets the values for those context attributes that are available in the execution environment.

Source:

Returns:

Type
Object

Gets the values for those context attributes that are available in the execution environment.

getHostname() → {string} #

Logs the warning to whatever logging backend that the execution environment, e.g. the console.

Source:

Returns:

Type
string
Logs the warning to whatever logging backend that the execution environment, e.g.

getPageviewId() → {string} #

Gets a token unique to the current pageview within the execution environment.

Source:

Returns:

Type
string
Gets a token unique to the current pageview within the execution environment.

getSessionId() → {string} #

Gets a token unique to the current session within the execution environment.

Source:

Returns:

Type
string
Gets a token unique to the current session within the execution environment.

logWarning(string) #

Gets the hostname of the current document.

Parameters:

Name Type Description
string string
Source:
Gets the hostname of the current document.