How and why to target keys with empty values in Google Ad Manager

Key-values are used in Google Ad Manager for customised ad targeting. For example you might have a key of 'postid'. You could pass a post's ID value into the Google Publisher Tag, then use the targeting picker in Google Ad Manager to target a line item to that particular post. For example here we are targeting the line item to the post with the 'postid' of '123':

Customised targeting in GAM

However if a page on the website was not a post and therefore did not have a postid, then that targeting key would (depending on how you have implemented key-values) have an empty value. You would be able to see something like this in the source code of the page - I've highlighted the relevant bit just to make it clearer:

No targeting value

You can use this to your advantage - by which I mean it is possible to make use of the presence or absence of a value (any value) for targeting purposes. Let's say, for example, that you want to target a line item to all posts on your website, but not to other pages such as the homepage or search results page. You also know that posts are the only pages on the website to have a 'postid'. In that case, you could do something like this:

Postid is any value

The asterisk matches any value (but not a null or blank value). So the line item will be targeted to any page with a postid, or in other words any posts.

Conversely, let's say that you want to specifically exclude posts from your targeting and only serve your line item to other pages. All you have to do is change 'is any of' to 'is none of'. Now your line item will serve to any pages without a postid, in other words not posts:

Postid is none of

A better approach would be to have a separate key such as 'pagetype', with values such as 'post', 'homepage', 'search results page' and so on. This would let you not only specifically target or exclude posts as above, but also be more granular than that - targeting the homepage but not search results pages, for example.

However in the absence of such a key, then the ability to target (or exclude from targeting) empty values might suffice in some situations. In fact I am a little surprised it is not covered in the Google Ad Manager Help page about custom targeting and key-values.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © James Clark
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram