Pageviews in GPT

GPT stores a record of each ad currently on the page (known as a pageview) using a client-side token. This will enable you to correlate requests from all ad slots on a page for an indefinitely long time period. Long-lived pageviews can improve monetization on pages with dynamic content where requests may be separated by long intervals, such as infinite scroll pages, pages with lazy loading, Single-Page Applications (SPA), and Progressive Web Applications (PWA).

Make creative selection decisions

Pageviews are used to make creative selection decisions that account for the creatives that will serve to other ad slots on the page, including the following cases:

  • Selecting multiple creatives from one set for roadblocking
  • Excluding individual creatives based on competitive exclusions
  • Preventing duplicate ads from serving to one page

Get started and best practices

This feature is enabled for all publishers. Most publishers won't need to make any changes to benefit from long-lived pageviews, but we recommend some best practices for API calls and structuring your page.

  • When removing an ad slot from a page, always use the destroySlots() API call to entirely destroy the slot and remove all related objects and references from the page so that the slot no longer impacts creative selection decisions for the ad server.
  • If you were previously using the updateCorrelator() API call to reset a pageview for roadblocks or competitive exclusions, this option no longer works. Long-lived pageviews use a client-side token, and updating the correlator has no effect on that token, so it doesn't cause a new pageview. Instead, pageviews only reset upon page navigation, or if you use destroySlots() to remove existing slots from the page.
  • If you previously relied on pageviews expiring after 30 seconds (for example, making a set of requests using SRA, then making another set of requests more than 30 seconds later, assuming roadblocking would no longer apply), consider restructuring your page or ad serving configuration.

Historical note: correlator value

When GPT constructs queries for each ad slot on a page, it automatically includes a "correlator" value in each request. This value is common to all ad requests from a page, but unique across pages. Historically, this correlator mechanism allowed the ad server to identify when ad requests came from the same page, which enabled roadblocking and competitive exclusions, and prevented duplicate ads from serving to the page. However, correlators were limited to a 30-second lifespan. This limit is removed for publishers using long-lived pageviews.

Was this helpful?
How can we improve it?