popups

Methods

getPageviewTracker(config) → {EventTracker}inner #

Gets the appropriate analytics event tracker for logging virtual pageviews.

Parameters:

Name Type Description
config Object
Source:

Returns:

Type
EventTracker

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

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

handleDOMEventIfEligible(handler) → {function}inner #

Creates an event handler that only executes if the current target is eligible for page previews and a title can be associated with the element.

Parameters:

Name Type Description
handler function
Source:

Returns:

Type
function

registerChangeListeners(store, registerActions, userSettings, settingsDialog, previewBehavior, statsvTracker, pageviewTracker)inner #

Subscribes the registered change listeners to the store.

Parameters:

Name Type Description
store Redux.Store
registerActions Object
userSettings UserSettings
settingsDialog function
previewBehavior
statsvTracker EventTracker
pageviewTracker EventTracker
Source:

Type Definitions

EventTracker(topic, data) #

An analytics event tracker, i.e. mw.track.

Parameters:

Name Type Description
topic string
data Object
Source: