Keyword targeting: Advanced Functions

AdButler's keyword system has a bunch of advanced features that allow for customization. They can be used to create highly customized ad serving models depending on the criteria you choose. We encourage you to read through all our keyword targeting articles to know which one will help you achieve the desired results.


AdButler's keyword macros are best thought of as shortcuts. They allow you to target specific criteria without having to manually code anything. No macros require you to set a keyword on the page.

  • The inurl: macro allows you to look in the URL of a page for keywords.
  • The date: macro allows you to target specific days of the week and time of day.
  • The publisherid: macro lets you target specific publishers, and is usually used to exclude them.

Special characters

You can use special characters together with keywords in order to change the behaviour of AdButler.

* A wildcard character that can stand in for any amount of letters greater than one.
- Makes a keyword into a negative match. Instead of a matching keyword improving an ad's change of serving, a match will now stop the ad from appearing at all. Acts the same regardless of Keyword Match Method.
, Allows you to separate multiple keywords in the keyword field. You can separate anything, from standard keyword matching to macros! When using multiple keywords, please keep in mind that only one can match per page.
+ Makes a keyword a required match. If a keyword with this operator is not detected, the ad will be stopped from appearing.
() Groups keywords. You can apply other operators to groups of keywords as if they are individual keywords.


Keywords passed in: blue, green
blue //Match

blue,green //Match

red //No Match

-blue //Eliminated

-blue,green //Eliminated

+red //Eliminated

+red,blue //Eliminated

+(red,blue) //Match

+(red,blue),+(purple,yellow) //Eliminated

+(red,blue),+(yellow,green) //Match

Assigning a keyword

Using window.abkw = 'KEYWORD' is the simplest way to assigned a keyword to a page, but it requires you to hard code the keyword onto the page. In situations where you need the keyword to be dynamic and one of AdButler's macros won't work you can set window.abkw to be equal to any JavaScript string variable. AdButler will treat the variable as if it was written directly on the page and behave properly.

Another method of assigning a keyword is to put it directly into a zone tag. The zone tags include a window.abkw = window.abkw || '' section. If you put your keyword between the '' it will be written on the page as the keyword. Usually this is used when you're distrubting one zone tag to multiple publishers and want each one to have specific ad items.

Can't find what you're looking for?

Send us an email

Visit the blog

For more ad serving tips, industry news and AdButler insights.