Module: popups

Methods

(inner) getCurrentTimestamp() → {number|null}

Returns timestamp since the beginning of the current document's origin as reported by window.performance.now(). See https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp#The_time_origin for a detailed explanation of the time origin.

The value returned by this function is used for the timestamp property of the Schema:Popups events sent by the EventLogging instrumentation.

Source:
Returns:
Type
number | null

(inner) getEventLoggingTracker(user, config, window) → {EventTracker}

Gets the appropriate analytics event tracker for logging EventLogging events via the "EventLogging subscriber" analytics event protocol.

If logging EventLogging events is enabled for the duration of the user's session, then the appriopriate function is mw.track; otherwise it's () => {}.

Parameters:
Name Type Description
user Object
config Object
window Window
Source:
Returns:
Type
EventTracker

(inner) getStatsvTracker(user, config, experiments) → {EventTracker}

Gets the appropriate analytics event tracker for logging metrics to StatsD via the "StatsD timers and counters" analytics event protocol.

If logging metrics to StatsD is enabled for the duration of the user's session, then the appriopriate function is mw.track; otherwise it's () => {}.

Parameters:
Name Type Description
user Object
config Object
experiments Experiments
Source:
Returns:
Type
EventTracker

(inner) registerChangeListeners(store, actions, userSettings, settingsDialog, previewBehavior, statsvTracker, eventLoggingTracker, pageviewTracker, getCurrentTimestamp) → {void}

Subscribes the registered change listeners to the store.

Parameters:
Name Type Description
store Redux.Store
actions Object
userSettings UserSettings
settingsDialog function
previewBehavior PreviewBehavior
statsvTracker EventTracker
eventLoggingTracker EventTracker
pageviewTracker EventTracker
getCurrentTimestamp function
Source:
Returns:
Type
void