This article presents a rules-based approach for Keyword Generation using Dictionaries, Grammar, and Feeds. Essentially, Dictionaries define the various groups of words that are relevant to an account. Grammar defines how to combine them.

Feeds define the data that may be changing regularly, like e-commerce inventory, store locations, etc. Readers may be able to generalize these terms to apply to existing rules-based tool if one is currently in use. First, a word about where this approach fits in to the broader picture.

The Broader Landscape of Managing Keywords & Negatives

There are many approaches for discovering keywords and adding them to a PPC Account, and many tools to support the various approaches. This article presents a rules-based approach and some tools that support it.

A good rules-based approach such as this often separates homegrown PPC Accounts from their more-mature competitors. This approach could be part of an overall strategy for managing Keywords and Negatives throughout the lifetime of a PPC account.

A Rules-Based Approach

A good rules-based approach is part of an overall Keywords and Negatives strategy. Most advertisers know how to manually add Keywords, many Advertisers know how to effectively use Negatives, and even How to Use Search Term View.

Quite often, efforts to add keywords in this way end up mostly manual, and occur something like: “Well, what about THIS keyword, or THAT one? Yeah, they would be good… But do don’t we have to go back and add that every where else, too?”

Good advertisers will often take that one step further and actually measure the value of their efforts by monitoring the value of those keywords over time. Some Advertisers know how to use other keyword research and generation tools such as SpyFu,, or and the like.

Some advertisers mine their SEO search queries for PPC keywords (and vice-versa), and some advertisers define rules for their automated tools that automatically add keywords based on performance (e.g.: for every broad match keyword with more than 100 clicks in a month, add a phrase match for the same keyword), or remove keywords based on lack of traffic (e.g.: remove keywords that have zero impressions after 3 months of eligibility). There are many components to managing Keywords and Negatives.

These are all healthy, productive components of a complete Keywords and Negatives strategy. A good rules-based approach helps advertisers leverage the good ideas by building them out across accounts.

  • Dictionaries: Define the various groups of words that are relevant to your account
  • Grammar: Define how to combine Dictionaries into actual Keywords, within your Account structure of Accounts, Campaigns, and AdGroups
  • Feeds: Define keywords that change over time, as with available inventory, prices, etc.


Consider a mythical PPC client, the ACME Bike Store. A previous Search Engine Land article demonstrating Stone Temple’s PPC Permutator uses a similar example. Today’s article builds on the ideas in the Permutator article. ACME’s Grammar might look like this:

That is to say, the Dictionary defines [terrain], [bike], and [product], each as a set of tokens that can be used in a Keyword Grammar to create Keywords.


ACME’s Grammar might look like this:

That is to say, the Grammar defines meaningful ways to combine the tokens defined in the Dictionary, to create Keywords. For example, the combination of the Dictionary and Grammar so far would produce:

The list expands quickly from here. This is one of the values of this approach: Generate a lot of useful Keywords for a minimum of creative effort. However, this benefit can also be a drawback.

It is not productive to produce an excess of keywords that generate zero impressions. It can actually be counter-productive, and negatively impact Quality Score. Managing Zero Impression Keywords and Quality Score are both integral parts of any complete PPC effort, and beyond the scope of this entry.

Regardless, there is no need to over-tax those processes by wantonly adding keywords.

Grammar With Match Types

A Grammar can also define the Match Types for each Grammar entry. By defining the Match Types for each entry, the Advertiser can avoid repeating the entry for each Match Type wanted. The above Grammar definition might now look like this:

Advertisers should choose the right combination of Match Types to create a list that is full of keywords that are specific enough, but not so specific that the Grammar generates an excess of Keywords with zero traffic.

That brings up another good practice beyond the scope of this article, which would be to devise a system for automatically expanding Keywords on new Match Types when they get enough search volume. Another day…

Grammar With Modified Broad Match Support

Advertisers may choose to support “Modified”, as in the example below. One way to do that is to include the “+” sign wherever it might apply in the Grammar definition for the Keyword. Keywords being added as “Modified” retain the “+” in the output, and any output for other Match Types simply remove them.

This way, the Grammar is expressive enough to address the requirements of “Modified”, without requiring additional entries. That is one worthy goal when designing these tools; minimize the amount of effort required of the Advertiser, by maximizing the expressive power and flexibility of the Grammar Syntax.

For the sake of simplicity, the remainder of this article will use examples without the “+”.

Grammar With Negative Match Types

Similarly, a Grammar can define Negative Keywords and Negative Match Types. This helps to craft Airtight AdGroups, which is a highly recommended best practice.

For example, an Airtight AdGroup approach would prevent searches for “mountain bike” from matching for the AdGroup containing the Keyword “mountain bike tires.” To handle that case, add a Negative Exact Match “mountain bike” to the “mountain bike tires” AdGroup.

Grammar With Account Structure

It will be necessary to specify where to put all of these Keywords in the PPC Account. This is one of the final pieces needed for a complete Keyword Grammar: Account, Campaign, and AdGroup.

In addition to naming the structure elements, using a good naming convention will be valuable for many reasons; one convention to consider would be to name the group from the Dictionary, then embed the actual token used within parenthesis.

Example: Group(token), as in the table below.

The Grammar definition above defines a new AdGroup for each token defined in the Dictionary for [terrain] and [product], e.g.:

  • Terrain(mountain) Product(tire)
  • Terrain(mountain) Product(tube)
  • Terrain(road) Product(tire)
  • etc.

Defining a naming convention enables the Advertiser to report or take action in bulk based on the name of the Account Structure elements, such as Campaign and ADGroup. Example: generate a report showing the performance for all “Product” AdGroups, vs. other AdGroups to find out if customers convert differently when they have a specific product in mind.

Advanced & Optional Considerations For Grammars

There are some optional components to include in this approach. Named Sets allow advertisers to define specific groups within the Dictionary. For example, a Grammar Entry for [product:tire], which might output the set of keywords {tire, tires}.

Similarly, advertisers could implement Named Sets with Magic Words. The “Each” Magic Word directs the Grammar to expand the Grammar Entry once for “each” token in the Dictionary. Advertisers could consider more complex rules, such as [product:singles]. This could expand one line for each of the Dictionary entries in the “product” group that are single words (vs. plurals).

One worthy enrichment is the “Other” Magic Word. This is really useful for Negatives, allowing the addition of every “Other” token the in Dictionary as a Negative. For example, add a Manufacturer(Puffy) AdGroup, and add a {Manufacturer:Other} Keyword as a Negative Phrase Match to prevent this AdGroup from picking up searches from any other Manufacturer.

Advertisers can enrich the Dictionary with whatever meta-data works in a given application, and use Syntax in the Grammar, like Named Sets and Magic Words, to consume that meta-data. The simplest version of these special cases that extend the capabilities beyond the Dictionary is the use of “raw text.”

Grammar Special Case: “Raw Text”

Grammars should be capable of using “raw text” to create names, as with “ACME Bikes” to define the Account Names in the Grammar above. Similarly, Advertisers could use “raw text” in a Keyword definition to combine with Dictionary tokens, or in even in lieu of them.

A good time to use this is when starting with an existing keyword list. Just add the current Keywords do the Grammar, and then continue to add new definitions using the Dictionary. This way the Grammar describes an entire Account structure, which can be quite valuable.


Use Feeds to define data that changes over time, such as available inventory. For example, ACME carries Puffy, Hwinn, and sometimes Sianchi bikes. A Feed might contain the following data:

Using Feeds In A Grammar

In order for a Grammar to consume the Feed above, the tool needs to understand a Syntax to express it. One could use curly-braces, e.g.: {Manufacturer}, {Category}, etc.

If Named Sets and Magic Words are implemented, consider enabling them to work with Feed elements as well. This provides the ability to expand Feed-sourced elements in a Grammar, like so:

Separate Grammar & Feed

Separating Dictionaries and Feeds provides the flexibility to adjust one while still leveraging the other. For example, an Advertiser can add a new Bike synonym to the Dictionary.

The next time the Account is generated, the Grammar will expand the new Bike-derived keywords for everything in the feed. Another example would be to add or remove a particular Manufacturer. The next time the Account is generated, the Manufacturer would be added or removed, respectively.

One note on scalability and the underlying implementation. Depending on the application, Advertisers may choose to expand the Dictionary first, or expand the Grammar first. Either way, the results should be deduped. Consider which approach will minimize the computing resources needed to address the exponential growth of the output.

Finally, it is worth noting that a similar approach, and much of the same data, can be used to produce Ads, as well as much of the rest of the information required to build a complete PPC Account.

A similar approach works for adding Geo-Targeting, with {lat} and {lon} for each {Location} provided in the Feed, and consumed in a Campaign Grammar supporting geo-targeting settings. The approach can be expanded to include whatever is needed in a given environment.

Build Your Own, Or Use An Existing Tool

This rules-based approach to Keyword generation, using Dictionaries, Grammars, and Feeds, provides a practical means of powerfully expressing new Keyword ideas into massively scaled PPC Account buildouts. The approach was presented generically in order to provide a basis for Advertisers to incorporate the ideas into tools and processes.

There are also commercial PPC tools available that already incorporate their own versions of some of the same concepts. Kenshoo offers “Real Time Campaigns”. Enterprise Travel advertisers have been using similar home-grown systems for almost a decade now. Of course Stone Temple offers The Permutator for free, and we have our own internal tools we use during Client engagements (Disclaimer: The Author is associated with Stone Temple Consulting.)

Stone Temple has built accounts with 10s of millions of Keywords, Negatives, and Ads for a client with over 800 locations throughout the United States, and uses the same approach to manage Keywords with the changing inventories of various e-commerce clients’.

These ideas can be implemented readily using home-brew or off-the-shelf tools, or by engaging with Consultants who have access to them. On a personal note, I eagerly anticipate the day when Search Engines adopt these ideas and make them available to Advertisers.

How would a rules-based Keyword Generation approach impact your PPC efforts?

Opinions expressed in the article are those of the guest author and not necessarily Search Engine Land.

Related Topics: Channel: Search Marketing | Search Marketing | Search Marketing Toolbox | Search Marketing: General | Search Marketing: Search Term Research | SEM Tools | SEM Tools: Keyword Research


About The Author: is Director of Advertising Services at Stone Temple Consulting. Crosby has extensive experience in search engine marketing including growing small accounts to multi-million dollar success stories at companies such as and

Connect with the author via: Email | Twitter | Google+ | LinkedIn


Get all the top search stories emailed daily!  


Other ways to share:

Read before commenting! We welcome constructive comments and allow any that meet our common sense criteria. This means being respectful and polite to others. It means providing helpful information that contributes to a story or discussion. It means leaving links only that substantially add further to a discussion. Comments using foul language, being disrespectful to others or otherwise violating what we believe are common sense standards of discussion will be deleted. Comments may also be removed if they are posted from anonymous accounts. You can read more about our comments policy here.

Comments are closed.


Get Our News, Everywhere!

Daily Email:

Follow Search Engine Land on Twitter @sengineland Like Search Engine Land on Facebook Follow Search Engine Land on Google+ Get the Search Engine Land Feed Connect with Search Engine Land on LinkedIn Check out our Tumblr! See us on Pinterest


Click to watch SMX conference video

Join us at one of our SMX or MarTech events:

United States


Australia & China

Learn more about: SMX | MarTech

Free Daily Search News Recap!

SearchCap is a once-per-day newsletter update - sign up below and get the news delivered to you!



Search Engine Land Periodic Table of SEO Success Factors

Get Your Copy
Read The Full SEO Guide