With Advanced Ads Pro, you can display or hide an ad based on URL parameters. This option is helpful if you have specific parameters in your URL or want to create additional display conditions.
You don’t have to make any changes to display an ad everywhere. Only use this option to limit where the ad is visible.
To display an ad based on the URL, go to the Display Conditions meta box and add the URL Parameters condition.
Once you have added the condition, you can choose from various methods to check it.
Be aware that Advanced Ads does not check the top-level domain. E.g., if your domain is http://example.com/directory/variable, then only /directory/variable is checked against your input. You can add the domain using this code snippet.
Examples of URL parameters checks
Advanced Ads Pro comes with many different types of checks. Here are just some examples of what you might accomplish.
Display ad for subdirectories. URL is http://example.com/capitals/germany/berlin.
The check displays the ad on all pages with
/capitals/ in its URL slug.
Hide an ad for visitors who come through a referral link (often used by affiliate programs). URL is http://example.com/shop/?partnerid=1234.
The URL parameters condition does not check anchor tags (e.g., https://example.com#anchor).
Changes to the URLs of your page through settings or additional plugins can lead to this condition not working as expected.
The condition works with passive Cache Busting, but we would prefer users not to rely on that in the future.
If you have any questions, don’t hesitate to contact the support.