What is contextual targeting?
Contextual targeting is how organizations display ads on another website based on the site’s content. The content on the website and the advertisement on the page should have an obvious connection and appear to be authentic and relevant – never random. Traditional contextual targeting is done by matching keywords on the page with keywords a business is looking to target.
One way to think about contextual targeting is like placing a print advertisement in a niche magazine. For example, a software as a service (SaaS) company wouldn’t put an ad on their website for a dishwasher or running shoes since those products aren’t in an aligned niche.
To ensure their contextual advertising efforts are successful, organizations use cross-channel advertising software to run ads across multiple digital channels such as search, display, mobile, social, and video. Leveraging these tools provides companies access to a wide variety of audiences and allows advertisers to take full advantage of what each channel offers.
Basic components of contextual targeting
For contextual targeting to work effectively, two components need to work together. These components are:
- A web crawler scans every URL of a website, which then categorizes the content and the placements.
- When a user visits a web page, the information about the URL is passed in the request to an ad server. Then, the ad server matches the data collected by the web crawler to the URL and can match relevant campaigns to keywords and topic categories.
Contextual targeting process
A specific process is followed when an organization runs contextual targeted ads. This process is:
- Choose the correct parameters. First, brands need to pick a topic or category that their campaign fits into. Doing so makes an advertisement eligible to run on a website. Organizations can also select keywords for more precise targeting within broader topics.
- Search engines analyze the page. Next, the search engine analyzes the content on each web page to match the ad with relevant content. Elements like text, language, page structure, link structure, images, and keywords are all considered.
- An ad is placed. Finally, a placement that matches the context of the ad is found and the contextual advertisement is placed on a website.
Benefits of contextual targeting
When an organization takes the time to incorporate contextual targeting in its advertising strategies, it’ll experience many benefits. Contextual targeting is beneficial because it:
- Addresses brand safety. Since contextual ads only show next to content relevant to their offering, it helps understand the distinction and sentiment of a page to determine its relevancy and safety. This gives brands peace of mind that ads are being placed on sites that accurately represent the brand and its message.
- Doesn’t rely on third-party cookies. In the world of online advertising, protecting consumer privacy is a must. Companies need to remember that heavy-hitters like Apple and Google are phasing out and blocking third-party cookies, so using this strategy is a way of the past. Thankfully, contextual targeting doesn’t target specific users, so it doesn’t rely on third-party cookies to be a success.
- Delivers a great customer experience. Despite not focusing on behavior, contextual targeting drives performance in a way behavior targeting cannot. Additionally, these ads are found to be less unnerving to a user, so they may be seen more positively.
- More accurate than ever. Contextual targeting has become smarter and more accurate due to artificial intelligence (AI). It also uses natural language processing (NLP) for a deeper and better understanding of the context and sentiment of a web page. Machine learning can help advertisers move away from relying on simple keywords and instead lean on AI to find the most relevant content.
Contextual targeting best practices
Organizations can follow certain best practices to deliver highly personalized ad content to their audience. Consider the following best practices when running a contextual targeting campaign.
- Get creative. For the best chance of success, get creative with the ad copy and design to capture the attention of the right audience.
- Include a call-to-action. Seeing the ad is one thing, taking action is another. Give users a clear call-to-action (CTA), like shop now, learn more, or start here.
- Consider the buyer’s journey. If an organization is struggling to develop keywords or choose a relevant category, review the buyer’s journey. Establish who the target audience is, what sites they visit, and what pages they browse.
- Don’t forget negative keywords. These are keyword terms with a close spelling to the targeted keyword. Including these terms also protects a brand from being associated with the wrong type of content. For example, an organization targeting the term “reading glasses” should set negative keywords for glasses that are used to drink beverages, so the ads don’t become misplaced.
Contextual targeting vs. behavioral targeting
Behavioral targeting, sometimes referred to as audience targeting, delves into a user's personal habits and actions to implement relevant ads. It segments audiences based on web browsing behavior like pages visited, searches performed, links clicked, and products purchased.
Contextual targeting is specific to the content of the web page to implement relevant ads.

Mara Calvello
Mara Calvello is a Content and Communications Manager at G2. She received her Bachelor of Arts degree from Elmhurst College (now Elmhurst University). Mara writes customer marketing content, while also focusing on social media and communications for G2. She previously wrote content to support our G2 Tea newsletter, as well as categories on artificial intelligence, natural language understanding (NLU), AI code generation, synthetic data, and more. In her spare time, she's out exploring with her rescue dog Zeke or enjoying a good book.