Interested in presenting selective ads specifically to your audience originating from search engines?
Our expertise, backed by various industry veterans, indicates that visitors via search engines are more inclined to interact with targeted ads. Tailoring ad visibility for this demographic can enhance your click-through rate (CTR) and subsequently elevate your revenues.
This guide will unveil how to configure WordPress to reveal ads solely to visitors funneling from search engines.
Why Only Target Ads at Search Engine Visitors?
Earning online can take various forms, and one successful avenue is through display advertisements.
Platforms like Google AdSense provide a means to serve ads on your WordPress site, rewarding you with a fee per user click—an approach known as cost-per-click (CPC).
Directing ads towards a specific readership augments their effectiveness, thereby maximizing ad income potential. Evidence and professional testimony suggest that search engine visitors are more prone to engage with site ads than others, making them prime recipients of your ad content, thus optimizing CPC.
A selective display strategy can also enhance overall site experience by mitigating ad clutter, displaying them only when there’s higher engagement potential.
Now we’ll guide you through the steps to set up this selective display of ads for search engine visitors on your WordPress site.
Technique to Exhibit Ads Exclusively to Search Engine Visitors
To achieve this, you must implement a custom code snippet within your WordPress site.
If the thought of code tweaks seems daunting, fret not. We’ll guide you through an easy procedure to insert code snippets effortlessly, without needing to delve deep into code adjustments or hiring a developer for assistance.
If Google AdSense is yet to be configured on your website, check out our tutorial on adding Google AdSense to WordPress correctly.
You’ll want to install and activate the WPCode plugin thereafter. See our tutorial on how to install a WordPress plugin for additional guidance.
WPCode is an optimal WordPress snippet plugin that eases the code insertion process throughout your site, providing management and organization capabilities for all your code snippets.
Attention: We’ll use the free WPCode Lite version for this tutorial. Premium versions offer extended functionalities such as conditional logic, error-safe management, a vast code snippet library, and more.
Post-activation, head over to Code Snippets » + Add Snippet in your WordPress dashboard. Click on ‘Add Your Custom Code (New Snippet)’.
Here’s the code snippet you’ll need:
// Your PHP code snippet goes here
Note: Alter the setcookie
directive to reflect your website’s domain.
Once you paste this code in WPCode’s ‘Code Preview’ section and set the ‘Code Type’ to ‘PHP Snippet’, proceed to save the snippet and select an insertion method that fits your requirements.
Selecting Site Locations for Ad Displays
Following the addition of the previous snippet, prepare another one determining the exact spots for your conditional ad displays to search engine referred visitors.
// Example PHP code to insert your ad code
Tip: Swap out ‘INSERT YOUR CODE HERE’ with the actual Google AdSense code within the snippet above.
The above example will use the initial code to verify whether the referrer falls within the defined search engine URLs. Should the criteria match, it will embed a ‘visitor’ cookie with a 1-hour lifespan from their site entry point.
Reiterate the process of adding a new snippet through Code Snippets » + Add Snippet within your dashboard. Paste your custom code and mark it as a ‘PHP Snippet’ type. Then choose the ‘Shortcode’ method within the insertion section to employ this functionality as needed across your site.
With the shortcode ready, integrate it into your website’s preferred sections. If it’s the sidebar ad banner you wish to dynamically display, navigate to Appearance » Widgets, and include a Shortcode widget with the copied shortcode. Apply the changes and voila!
Search engine derived visitors will now encounter the specified ads for an hour following their initial visit. Should these users return through bookmarked pages beyond this time frame, they’ll be treated as regular readers, hence exempt from the targeted ads.
This tutorial should serve as a comprehensive guide to displaying ads to search engine visitors within WordPress. Looking to sharpen your WordPress SEO knowledge or discover impeccable WordPress ad management plugins? Explore our expert picks and ultimate guides.
Enjoy our insights? Subscribe to our YouTube Channel for WordPress video tutorials. You’re also welcome to connect with us on Twitter and Facebook.