Chrome DevTools

Ads Domain

A domain for ad-related metrics and data.

Experimental

Methods

Types

Methods

Chrome DevTools

Ads.getAdMetrics #

Retrieves ad metrics for the current page.

Return object

metrics

Chrome DevTools

Ads.getAdScripts #

Retrieves ad scripts for the current page. To minimize payload size, this only returns the newly tracked ad scripts since the last call to getAdScripts (i.e., the delta).

Return object

newScripts
array[ AdScript ]

Types

Chrome DevTools

Ads.AdFrameData #

Ad frame data.

Type: object

Properties

frameId
Page.FrameId

The DevTools frame token.

initialOrigin
Optional
string

The initial origin of the frame. To minimize the payload size, this is only sent once per frame.

networkBytes
number

The network bytes of the frame.

cpuTime
number

The CPU time of the frame, in milliseconds.


Chrome DevTools

Ads.AdMetrics #

Ad metrics for a page.

Type: object

Properties

viewportAdDensityByArea
integer

The viewport ad density by area, represented as a percentage (an integer between 0 and 100).

averageViewportAdDensityByArea
number

The time-weighted average of the viewport ad density by area, measured across the duration of the page.

viewportAdCount
integer

The number of ads currently visible within the viewport.

averageViewportAdCount
number

The time-weighted average of the viewport ad count, measured across the duration of the page.

totalAdCpuTime
number

The total ad CPU usage, in milliseconds.

totalAdNetworkBytes
number

The total ad network bytes.

updateAdFrames
array[ AdFrameData ]

The list of ad frames that have been updated since the last event.

removeAdFrames
array[ Page.FrameId ]

The list of ad frame IDs that have been removed since the last event.


Chrome DevTools

Ads.AdScript #

An ad script. Note: when the script is a transitive ad script, we only fill in the immediate ancestor script in the provenance's adScriptAncestry field (as its first entry), rather than filling in the full ancestry. This saves work for the backend, and the frontend can reconstruct the full ancestry if necessary.

Type: object

Properties

scriptId
Runtime.ScriptId

The script ID.

provenance
Network.AdProvenance

The ad provenance.