Pagina pe care ați solicitat-o nu este disponibilă în limba dvs. Puteți să selectați altă limbă din partea de jos a paginii sau să traduceți instantaneu orice pagină web în limba dorită folosind funcția încorporată de traducere din Google Chrome.

Understand and manage GPT client-side tokens

This article describes Google Publisher Tag (GPT) client-side tokens, including how they're used to optimize ad serving and the best practices to use them effectively, especially when serving ads to dynamic content.

Note: The client-side token feature is enabled for all publishers. Most publishers won't need to make any changes to benefit from this token, but some best practices for API calls and structuring your page are recommended.

What are client-side tokens?

In the content of GPT, client-side tokens are records stored in a user's browser that allow for the correlation of ad requests on a page, aiding in optimized ad selection and delivery. Client-side tokens help ensure a more cohesive and efficient ad serving experience. 

How are client-side tokens used with GPT?

Here are some examples of how client-side tokens are used to help ensure a more cohesive and efficient ad serving experience with GPT: 

  • Track ad rendering: GPT creates a client-side token, a record of rendered ads on a page, which helps correlate ad requests from various ad slots on the page.
  • Benefits for dynamic content: It improves monetization on pages with dynamic content, such as pages with infinite content or lazy loading where ad requests might be spread out.
  • Creative selection: The token assists in selecting creatives for other ad slots, which is useful for roadblocks (multiple creatives from one set), competitive exclusions (preventing competitors' ads), and for preventing duplicate ads.

Best practices to take advantage of client-side tokens

Use single request architecture (SRA) with all ad slots

In order to receive the expected ad serving behavior with the best possible performance, use single request architecture (SRA) to send a request containing all ad slots you want decided together.

If generating SRA requests is not possible, you can fully serialize your requests to ensure the expected behavior. Each request must wait on the SlotResponseReceived event from the previous request. However, this is not optimal for latency and serialization and should only be used if absolutely necessary.

Use destroySlots() to remove ad slots

When removing an ad slot from a page, always use the destroySlots() API call to dismantle the slot and remove all related objects and references from the page.

Once the client-side token expires, the ad slot stops impacting creative selection decisions for the ad server.

The client-side token resets when destroySlots() is used to remove existing slots from the page. The token also resets when using the page navigation.

Be aware of token expiration

A GPT client-side token automatically expires after 10 seconds. You should structure your page and ad serving configuration to accommodate this timing limit.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
13406139178123186164
true
Search Help Center
true
true
true
true
true
148
false
false
false