Welcome to WebmasterWorld Guest from 3.227.249.234

Forum Moderators: martinibuster

Google Ad Manager for passback

     
9:11 pm on Oct 7, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1193
votes: 119


I absolutely hate Google Ad Manager / DFP... documentation makes no sense, complicated as all get out, and makes NO sense at all!

But since I'll be implementing Infinite Scroll, I have little choice but to use it.

While I'm here, I see that it at least has a Passback feature (a great feature that Adsense seems to have dropped, and makes NO sense at all).

But par for the course, the documentation on this makes no sense, either. So I'm hoping someone here can make heads or tails of it?

Here's what they say to do:

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
googletag.pubads().definePassback(
"/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60]).display();
</script>

[developers.google.com...]

Is "/network_ID/first_level_ad_unit/second_level_ad_unit" supposed to be the absolute link to the script I'm using for a passback? Eg, "https://www.example.com/passback.php"?

In the example that they have nested within the script tags, but my build is different. Here's what I'm actually using, with what I THINK is the right way to do a passback in the notes:

<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>

<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];

var slot = adMap = new Array();

googletag.cmd.push(function() {
adMap['horizontal'] = googletag.sizeMapping()
.addSize([800, 0], [1, 1])// desktop, > 800x0
.addSize([728, 0], [728, 90])// tablet, > 728x0
.addSize([320, 0], [320, 50])// mobile, > 320x0
.build();

adMap['footer'] = googletag.sizeMapping()
.addSize([728, 0], [728, 90])
.addSize([320, 0], [300, 250])
.build();

slot[0] = googletag.defineSlot('/xxxx/' + h_resp, [[728, 90], [320, 50]], 'banner_0')
.defineSizeMapping(adMap['horizontal'])
.addService(googletag.pubads());

slot[1] = googletag.defineSlot('/xxxx/' + f_resp, [[728, 90], [300, 250]], 'banner_1')
.defineSizeMapping(adMap['footer'])
.addService(googletag.pubads());

//// do I put the definePassback here, like this?
googletag.pubads()
.definePassback('https://www.example.com/passback.php?size=800', [800, 0], [1, 1])
.display();

googletag.pubads()
.definePassback('https://www.example.com/passback.php?size=728', [728, 0], [728, 90])
.display();

googletag.pubads()
.definePassback('https://www.example.com/passback.php?size=320', [320, 0], [300, 250])
.display();

// OR, can they be mashed in to one, like:
// googletag.pubads()
// .definePassback('https://www.example.com/passback.php?size=800', [800, 0], [1, 1])
// .definePassback('https://www.example.com/passback.php?size=728', [728, 0], [728, 90])
// .definePassback('https://www.example.com/passback.php?size=320', [320, 0], [300, 250])
// .display();
//// end the definePassback guesses

googletag.pubads().enableSingleRequest();
googletag.pubads().disableInitialLoad();

googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
</script>


Or is it supposed to be in the section where I call the banner, which already has a .display() command?

// this is the current command
googletag.cmd.push(function() {
googletag.display('banner_0');
googletag.pubads().refresh([slot[0]]);
});

// Should it be like this?
googletag.cmd.push(function() {
googletag
.pubads.definePassback('https://www.example.com/passback.php?size=320', [320, 0], [300, 250])
.display('banner_0');
googletag.pubads().refresh([slot[0]]);
});
11:59 pm on Oct 7, 2019 (gmt 0)

Junior Member

joined:Aug 7, 2017
posts:48
votes: 12


Sorry, can't help you on the passback feature but curious as to why you say this:

But since I'll be implementing Infinite Scroll, I have little choice but to use it.
12:53 am on Oct 8, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1193
votes: 119


It appears that the only "approved" way to use Adsense in Infinite Scroll is to use GAM. At least, if you want the ads to load on the infinite-scroll-loaded pages, I mean. It has something to do with the Adsense policy regarding a refresh.

I made a detailed post on it awhile back, if you're interested:

[webmasterworld.com...]
8:59 am on Oct 8, 2019 (gmt 0)

Junior Member from GB 

10+ Year Member Top Contributors Of The Month

joined:Aug 18, 2005
posts: 144
votes: 30


Passback functionality in GAM is when you passback into GAM. We do infinite scrolls for some publishers. We do passback for some publishers. The two aren't interlinked though. I wonder whether the documentation has sent you off in the wrong direction somewhere along the line (it happens a lot!).

Can we back up a bit? What are you trying to achieve? Just using GAM to display google demand on an infinite scroll page?
12:19 pm on Oct 8, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1193
votes: 119


Passback functionality in GAM is when you passback into GAM. We do infinite scrolls for some publishers. We do passback for some publishers. The two aren't interlinked though. I wonder whether the documentation has sent you off in the wrong direction somewhere along the line (it happens a lot!).

Well, shoot. The fact that in Adsense it was called a "passback", and now GAM has the same word meaning something else... yeah, that sounds about right... LOL

Can we back up a bit? What are you trying to achieve? Just using GAM to display google demand on an infinite scroll page?

I've been rebuilding my site for awhile (seriously, going on 3 years :'-( ), and the new site is using Infinite Scroll. The current site just has Adsense without GAM.

So in Adsense, I use Ad Balancer to filter out the ads that don't pay anything... it's set to something like 60/99%. I direct sell ads for a different location on my site, and used to use Adsense's passback to show those ads when Adsense couldn't fill.

But now that Adsense doesn't offer the passback, I have a ton of blank spots showing up. I wouldn't mind if they would at least collapse, but the majority don't; waaaay too often, so I see a 975x300 blank spot at the top of the page! And a lot of users complain, so I know it's not just me.

So when I switch over to GAM, that's what I'm hoping to prevent.
12:39 pm on Oct 8, 2019 (gmt 0)

Junior Member from GB 

10+ Year Member Top Contributors Of The Month

joined:Aug 18, 2005
posts: 144
votes: 30


I am really not a fan of ad balancer. This is just one reason.

How I'd do this : I'd use adx rather than adsense (sorry!), trafficked as an adx priority line item. I'd then have a house priority line item serving something else to prevent empty ads showing. This isn't quite the same as passback, but is exactly what you are trying to achieve.

If I didn't have access to adx then I suspect you can do exactly the same with AdSense. I just haven;t tried it (because AdX is better). The important thing is that adsense would need to be a line item not set to backfill on the ad units. Annoyingly, not every GAM account has line item level adsense enabled. (if you can create a line item with priority "AdSense" then yours does).

If neither of those are an option I'd at least look at collapsing empty units. That might at least stop it looking crap.

A note about passback terminology : Technically AdSense and GAM are using this in the same way, but from different perspective. AdSense is an ad network, so you would set something to passback to when unfilled. With GAM you can always have another line item to ensure fill, so passbacks are what happens within a line item that doesn't have 100% fill and can't use dynamic allocation. In this case you passback to the adserver using a passback tag.

Example: Network A offers you $10 CPM but only fills 20% of impressions. You give them a GAM passback tag to serve on the other 80% and traffic everyone other than Network A into that tag. Google my name + "Ad Waterfalls" for a better explanation.
6:32 pm on Oct 8, 2019 (gmt 0)

Junior Member

joined:Aug 7, 2017
posts:48
votes: 12


I use hard coded AdSense on many sites with infinite scroll.

The ad calls on subsequent pages don't occur until a new URL is loaded.
10:37 pm on Oct 8, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Mar 15, 2013
posts: 1193
votes: 119


I could never get that to work, @Nightmute. I use Ajax fragments to load the subsequent pages, and ads on them just don't load. No Javascript errors in the console or anything, they just never load.

After researching it, it seems like everyone had that same problem. I was able to find instructions on how to set it up with DFP, though (now GAM):

[support.google.com...]


[edited by: not2easy at 2:29 am (utc) on Oct 9, 2019]
[edit reason] See Charter [webmasterworld.com] [/edit]

11:42 am on Oct 9, 2019 (gmt 0)

Junior Member

joined:Aug 7, 2017
posts:48
votes: 12


@csdude55 sent you an example