trackAllContentImpressions

The trackAllContentImpressions() method enables or disables automatic tracking of content block impressions. The impression is tracked after the content block is loaded on the page.

The content block is an HTML element tagged with the data-track-content attribute or the piwikTrackContent class.

Syntax

trackAllContentImpressions()
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void

Example

_paq.push(["trackAllContentImpressions"]);
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void
trackAllContentImpressions(): void

Notes

  • A content block is an HTML element tagged with the data-track-content attribute or the piwikTrackContent class.
  • This method scans the entire DOM for content blocks.
  • This method won't send duplicates on repeated calls unless the trackPageView() method was called between calls to trackAllContentImpressions().

Related methods