Can I have a Adsense fallback on Google Ad Manager only if a variable is set or something?

472 Views Asked by At

On my site, I serve ads to both visitors/free members and paid accounts. The ads are served with Google Ad Manager.

In the case of visitors/free members, I would like to fall back on Adsense if there is no Ad Manager ad to display.

In the case of paid accounts, I would like to fall back to a house ad.

Is this possible somehow?

1

There are 1 best solutions below

0
On

You can do this :

  1. if user is loggued, add a key member=true to your GPT page level targetings.
  2. then target your adsense line items to the inventory with key member=true only

To define page level key/values :

googletag.pubads().setTargeting('member', 'true');

Just keep in mind setTargeting only accepts strings or array values as detailed here (bolean or integer won't work)

Here is how to set your Adsense campaign up in Google Ad Manager.