Namespace: onLinkExposureUpdate

linkExposure.onLinkExposureUpdate

An event that fires when data about link exposures on a page is available. This event can fire multiple times for one page, as link exposures occur and the URLs for those links are resolved.

Source:

Methods

(static) addListener(listener, options)

Add a listener for the onLinkExposureUpdate event.

Parameters:
Name Type Description
listener linkExposureUpdateListener

The listener to add.

options Object

Options for the listener.

Properties
Name Type Attributes Default Description
linkMatchPatterns Array.<string>

Match patterns for links where the listener should receive individual resolved URLs. Links that do not match this match pattern are included in an aggregate count.

pageMatchPatterns Array.<string>

Match patterns for pages where the listener should be provided link exposure data.

privateWindows boolean <optional>
false

Whether to measure links in private windows.

Source:

(static) hasAnyListeners() → {boolean}

Whether the onLinkExposureUpdate event has any listeners.

Source:
Returns:

Whether the event has any listeners.

Type
boolean

(static) hasListener(listener) → {boolean}

Whether a specified listener has been added for the onLinkExposureUpdate event.

Parameters:
Name Type Description
listener linkExposureUpdateListener

The listener to check.

Source:
Returns:

Whether the listener has been added for the event.

Type
boolean

(static) removeListener(listener)

Remove a listener for the onLinkExposureUpdate event.

Parameters:
Name Type Description
listener linkExposureUpdateListener

The listener to remove.

Source:

Type Definitions

linkExposureUpdateListener(details)

A listener for the onLinkExposureUpdate event.

Parameters:
Name Type Description
details Object

Additional information about the link exposure update event.

Properties
Name Type Description
pageId string

The ID for the page, unique across browsing sessions.

url string

The URL of the page, without any hash.

matchingLinkUrls Array.<string>

An array containing the resolved URLs of links on the page that the user was exposed to and that matched a provided match pattern.

nonmatchingLinkCount number

The number of resolved links on the page that the user was exposed to and that did not match a provided match pattern.

Source: