Targets let you show different ads in the same zone for different users or pages in the publisher's site. With keyword targeting, you can serve the assigned campaign only on pages with certain URLs or words. You can also use keyword targeting to require specific publishers to be served, or to exclude them from being served certain ads.

In this article, you will learn how to use keyword targeting in campaigns and in email ads.

How Does Keyword Targeting Work?

For websites, whenever an Indie Ads Manager ad zone is loaded in a page, the global JavaScript variable window.abkw is recorded as the keyword for that page. This is the variable to which keywords are assigned. In most cases, window.abkw won't be set to any keyword and Indie Ads Manager will ignore it.

For emails, the keyword variable is kw. You must manually include this variable in the email zone tag along with the keyword to enable targeting in emails.

If window.abkw or kw is set to a keyword, Indie Ads Manager will look at the assigned ads or campaigns in the zone to see if any of them match the keyword.

  • If an ad item or a campaign's keyword is set to Preferred, it will be prioritized and displayed above other ad items or campaigns that are not specifically targeted by keywords. Even if the keyword is not detected, there is still a chance for the ad to appear in that placement.
  • If the keyword is Required, the ad item or campaign will be prioritized and have a chance to be served only if the keyword matches.
  • If a keyword is Filtered, the ad item or campaign will have a chance to be served only if the keyword matches, but its likelihood of being served does not increase.

Note: Indie Ads Manager does not search pages or URLs for keywords. You need to manually specify the keywords for window.abkw when adding the zone tags into your site. If your site has variables for keywords, ensure you assign the appropriate variable to window.abkw.

Keyword Syntax and Special Characters

Keywords and Keyword Macros

  • String - This is the word or phrase that you want to be on your page, i.e., News
  • inurl: - A keyword macro that you use to target a string in a URL instead of within the page itself. Do not add a space between the colon and the string, i.e., inurl:news.
  • publisherid: - A keyword macros that you use to target a specific publisher based on the publisher ID. Do not add a space between the colon and the ID, i.e. publisherid:12345.

Special Characters

Aside from the string itself or the keyword macros, there are special characters that extend the features of keyword targeting, such as letting you search for multiple keywords at once, or excluding the matching page or publisher from being served.

  • * (asterisk) - A wildcard character. For example, *ews will match any four letter word within the page that ends in "ews".
  • - (hyphen) - Specifies that a keyword is a negative match. While a regular match gives an ad a chance to be served, a negative match prevents the ad from appearing at all. This works with all keyword types. Do not add a space between - and the keyword. For example, -publisherid:12345 tells Indie Ads Manager not to serve the ad or campaign to that publisher.
  • , (comma) - Allows you to specify multiple keywords. This works with all keyword types, but it is an OR operator. In other words, Indie Ads Manager will consider a match even if only one or some of the keywords match. Do not add a space between keywords and commas. For example, news,inurl:news,-publisherid:12345 tells Indie Ads Manager to serve the ad to a page with the word "news" within the page, a page with "news" in the URL, OR to sites that are not owned by publisher 12345.
  • + (plus) - Makes a keyword a required match. If the keyword is not detected, the ad will not be served. Do not add a space between + and the keyword. For example, +inurl:news will serve that ad only to pages with "news" in the URL. Note, this only works with the Preferred keyword targeting option.
  • () (brackets) - Groups keywords together. This lets you apply other special characters to groups of keywords as if they were individual keywords. This is an AND operator. For example, +(news,inurl:news),-(publisherid:12345) tells Indie Ads Manager to serve the ad only to pages with a match of news or inurl:news, AND not owned by publisher 12345. Note, this works only with the Preferred keyword targeting option.
  • \ (backslash) - Specifies that the succeeding hyphen (-) or plus sign (+) is part of a keyword and not a special character. You must add this character if your keyword or list of keywords contains an AND operator (), even if the - or + is outside the operator. For example, instead of typing +(hotels,self-catering holiday homes), you should type +(hotels,self\-catering holiday homes).

Assigning Keywords to a Campaign

  1. Navigate to the relevant campaign dashboard (Advertisers > Your Advertiser > Your Campaign).
  2. Click Assign to Zone on the top right of the Zone Assignments table. A list of eligible zones will appear.
  3. Select a zone to which the campaign will be assigned. The Assignment Details page will appear.
  4. Select a serve method. The rest of the settings will appear.
  5. Set the initial settings as needed, then scroll down to the bottom of the page. Click Targeting to expand its settings.
  6. Enter your keyword(s). Be sure to use the correct syntax!
  7. Select a keyword targeting option:
    • Preferred: If the assigned keyword matches the one in your zone tag or matches the keyword in the script of the page, the ad item or campaign will receive prioritized placement and be displayed above other ad items or campaigns that are not specifically targeted by keywords. Even if the keyword is not detected, there is still a chance for the ad to appear in that placement.
    • Required: The ad item or campaign will be moved to the front of the line for prioritized placement. However, unlike preferred, if the keyword is not detected the ad item or campaign will not be served.
    • Filtered: The ad item or campaign will appear only if there's a keyword match. However, unlike required, it will not receive prioritized placement and will be in rotation with other ad items that are also targeted to the same page.
  8. Click Save.

You can now enable keyword targeting on your site.

Enabling Keyword Targeting on your Indie Site

Enabling keyword targeting will require you to add a snippet of code to the source code of your website. 

  1. Open the source code for the webpage header.
  2. Add this snippet to the header, replacing 'YOUR_KEYWORD' with the keyword for the page. Be sure to enclose the keyword in single quotes.

    <script>
    window.abkw = 'YOUR_KEYWORD';
    </script>

  3. Save your changes.

Checking if a Keyword is Enabled on your Indie Site

  1. Open the page in a browser.
  2. Right-click the page, then select the Inspect option. The browser inspector will open.
  3. Click on Console.
  4. Search for window.abkw within the console. If it appears and has the right keyword, then the keyword was properly set.

Enabling Keyword Targeting in Email Ads

  1. Go to the dashboard of the email ad zone to which you assigned the campaign.
  2. Click Get Zone Tags on the far right panel. The Zone Tags window will appear.
  3. Add &kw=YOUR.KEYWORD after your EUID in the img src tag, placement YOUR.KEYWORD with the keywords for the email. Do not add quotation marks to the keyword.
  4. Copy the entire zone tag.
  5. Log into your email platform and create a new template or replace the zone tags in an existing template.
  6. Save the template.