How to serve ads on a Specific page?.

Most of the new publishers having this query on their mind. How to serve ad to the specific page? or How to target specific ad slot in the specific page?.

Is this possible in Google Ad Manager?

Yes, It is possible.

How to do it?

There is an option in Google Ad Manager called “Key Value” targeting. Using this option targeting can be done either to serve ad to the specific page or Specific ad slot.

Is there tagging edit required?


Refer the following steps to target specific ads or specific Page.

There are two types of key value targeting.
1. Ad unit Level targeting
2. Page Level targeting

Ad Unit Level targeting is used to target specific ad slot in the page. Example: ATF, BTF

Page level targeting used to specific pages and it will be passed to all ad units present in the particular page. Example: Home, News, etc.

How to find the difference between Ad unit level and Page level in the GPT tagging?

Ad Unit level Key value have the syntax “.setTargeting(‘Key’, [‘Value’])” in the ad unit declaration in the header tag. See example below.

//Adslot 1 declaration
    gptadslots.push(googletag.defineSlot('/123/test', [[300,250]], 'div-gpt-ad-2666420-1')
                             .setTargeting('POS', ['ATF'])

Page level Key value have the syntax “googletag.pubads().setTargeting(‘Key’, [‘Value’])” in header tag before “googletag.enableServices();” . See the example syntax below.

<!-- Start GPT Tag -->
<script async='async' src=''></script>
  var gptadslots = [];
  var googletag = googletag || {cmd:[]};
  googletag.cmd.push(function() {
    //Adslot 1 declaration
    gptadslots.push(googletag.defineSlot('/123/test', [[300,250]], 'div-gpt-ad-2666420-1')
                             .setTargeting('POS', ['ATF'])

    googletag.pubads().setTargeting('PageName', ['Home']);
<!-- End GPT Tag -->

Once tagging implementation is done. Need to finalize the setup in Google Ad Manager.

Ad Manager Setup Instruction

Go to the Inventory setup on the side Panel and click “Key-values” .

1.)Name: POS
2.)Add values: ATF,BTF,etc

Then Goto your line item and targeting part. Select Key values which you created and target the respective key values.

If you need to pass dynamically pass the key values using the script?. Feel free to connect here.

Hope this article helps everyone !!!!!