An interesting dynamic GAM div id integration use case that has been performed by our team in close cooperation with a Publisher. The site looks very standard. It uses standard Google Ad Manager in-page ad units and several “special” out-of-page ad units. The complexity was in the requirement of running all “special” out-of-page ad units without touching HBM wrapper and prebid infrastructure.
As you may aware, there must be only one GPT.js call on a web page in order to not have conflicts and errors. And, at the same time, when we send prebid winning bids to GAM we must call GPT.js inside-out from the wrapper.
The solution found – HBM team has created the site as the GAM-integrated one as well ad applied the “Dynamic Div Id” feature as the standard does for infinite scrolling pages. But in this case, the feature is used to dynamically call ad units as per custom scenario. Some additional custom js code has been created for the site also.
Result – site works as intended. All In-page ad units take part in prebid and GAM auctions now, out-of-page ad units are governed by GAM and direct advertisers only as per the initial plan.
You may find more information about HBM platform, about how prebid may help to yield from an online advertisement in our blog, here is an interesting post.