简体   繁体   中英

Infinite scroll – show same ad units multiple times

I have an ad unit

googletag.defineSlot('/67583982/en_728x90', [728, 90], 'div-gpt-ad-1526897670210-0').addService(googletag.pubads());

I want to show it in multiple place as user scroll , I have to show it multiple times.

But it shows only first time. After some reseach I realize that we show one ad unit only once on same page?

How can I add in infinite scroll?

您需要创建一个新的DIV,并为每个新广告定义一个广告位,并为该广告位分配一个新ID,您可以在defineSlot调用中传递该ID。

I find its official documentation get an asnwer

googletag.cmd.push(function() {
 var slot = googletag.defineSlot('/6355419/Travel', [728, 90], slotName).
     setTargeting("test","infinitescroll").
     addService(googletag.pubads());

Here is its link:- Tags on Pages with infinite content

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM