Tracking add-on – Troubleshooting

This page contains solutions for common issues and questions related to our Tracking add-on.

Also, check out the common issues on this page.

Keep in mind: There is no tracking tool like the other. So minor differences between the results of different tools are very normal.

Impressions missing completely

Please see the following potential causes of impressions not being tracked at all:

  • Check if impression tracking is still enabled by default under Advanced Ads > Settings > Tracking.
  • Check if impression tracking is enabled under Ad Parameters on the ad edit page.
  • If using the Frontend or Database method, check if Advanced Ads created the tables for tracking. See Tables not created for more details.
  • If using Google Analytics, please see Debug Google Analytics tracking.
  • Make sure that your site does not have any JavaScript issues.

Impressions too low

If you feel that the recorded impressions are too low, please consider the following ideas.

General issues

  • Double-check your settings. Is the ad visible for all users on all pages where you want them?
  • Please be aware that 20% to 60% of website users have an ad blocker installed. Blocked ads result in lower ad impressions. Advanced Ads provides different features to deal with ad blockers. Learn more about them in our ad blocker tutorial.
  • Impression tracking on AMP pages only works if the page uses HTTPS.

Google Analytics tracking

Google Analytics has a total limit of 500 events per session. Each ad impression is a single event. Usually, Advanced Ads needs only one event per ad impression. Therefore you shouldn’t reach the 500 events. 

But other plugins, scripts, or custom code might also consume events that add up to the limit. If you use eCommerce, scroll, or video tracking heavily, it may be possible that you reach the 500 events per session.

Additionally, Google Analytics can only handle 20 events on page load. Every 2 seconds, these 20 events get replenished. 

If you use a lot of ads on a single page in combination with other event-consuming plugins or scripts, it may be possible that some ad impressions aren’t tracked. 

Tip: In some situations, you might want to create a new property for tracking ad impressions and clicks.

Other reasons for low impressions

  • With caching enabled on your website, you must choose the Frontend tracking method or use Cache Busting in Advanced Ads Pro.
  • Tracking is by default disabled for bots. Bots can make up to over 50% of web traffic, and some statistic tools don’t exclude them.
  • If you see the advads_tracking_methods is not defined error in the browser’s developer console, then it is likely that some script optimization removed part of our code from your site. At this point, this is a known issue with Ezoic. Please reach out to them for a solution.
  • We have observed cases where hosters like GoDaddy used a firewall that interfered with impression tracking. The problem could be solved by whitelisting.

Impressions too high

General issues

  • Each ad is tracked individually. If you use the same ad multiple times per page, every one of its impressions is tracked.
  • Each ad in an ad slider is tracked once with the page load. Compared to this, ads loaded with the refresh on the same spot option are tracked only once they become visible for the first time.
  • Make sure that Settings > Tracking > Track bots is disabled.

Google Analytics tracking

  • The Google Analytics tracking method could push impressions from multiple sites into the same Analytics report if using the same Property ID on several websites. This issue is especially common if you are actively using a test site.
  • Go to your Analytics account, navigate to Admin > [choose the property] > [choose the view] > [go to View Settings] and enable Bot Filtering.

Other tracking methods

  • Tracking is, by default, disabled for known bots. However, there could still be a large amount of bot traffic unrecognized as such. Switching to the Frontend tracking method filters out most bots naturally.

Different Impressions compared to Analytics

If you notice a huge difference between ad impressions and page impressions in your page analytics (e.g., Google Analytics), you should be aware of a few things:

  • Only compare page impressions with impressions of ads that are displayed to every user and on every page.
  • Database tracking could count every visitor, even bots, and therefore result in much higher ad impressions.
  • If you are using AMP, make sure that AMP is configured correctly for page impression tracking.
  • If you are using a consent-gathering tool, make sure it is correctly configured for ads and page impression tracking.
  • Google Analytics only tracks the first 20 events per page impression. If you have more events per page, including ad impressions and other custom events, you will notice lower impressions than local ad impression tracking.

Clicks not tracked

Make sure that your site does not have any JavaScript issues.

Tracking might not work for ad types from third-party plugins like the Advanced Ads integration developed by PeepSo. They told us that they won’t be able to work on the compatibility.

Clicks too low

We are not aware of a general problem causing too few clicks to be tracked locally. However, an advertiser may see fewer visits from your site in their Analytics account under Acquisition > All Traffic > Referral than Advanced Ads recorded clicks on banners that lead to their website.

There are various potential causes for this, both on your website and on the website your ad links to. For example, redirects from HTTP to HTTPS can cause the original referrer to get lost.

The use of the noreferrer attribute in the ad code can also lead to the traffic showing up in the Google Analytics reports of the target page under (direct)/(none) instead of the publisher’s website being mentioned as the referral traffic.

The most reliable method to track referrals from your website on the advertiser’s site is by adding UTM parameters to the target link. However, there are also some things to consider with UTM parameters.

We have dealt extensively with the analysis of referral traffic in Google Analytics. In this tutorial, we show how we test such scenarios and what we have learned about Google Analytics and UTM campaign links.

Please find more information on how to use them in the Google manual.

Clicks too high

The most common reason for too many clicks is bots following the links.

The Frontend and Google Analytics methods are less likely to count bot traffic. 

Advanced Ads comes with an additional filter for the most common bots, but you might want to add more using the advanced-ads-bots filter if you find one in the tracking debug log that is not blocked yet.

Also, make sure that Settings > Tracking > Track bots is disabled.

Redirecting rules and plugins can lead to unwanted behavior concerning the linkout cloaking and link parameter transfer.

Different numbers compared to AdSense and other ad networks

Normally, impressions and clicks recorded by Advanced Ads can vary from those of Google AdSense, other ad networks, or ad servers. This is due mainly to differences in the timing of when the impression is tracked and to ad blockers and bot traffic.

We consider a difference of 30% as expected, even after following all the debugging advice on this page.

When comparing numbers from Advanced Ads with the ones from an ad network, make sure that you filter the ads from that network in the Advanced Ads reports. Disable tracking for network meta codes, like header tags for Google Ad Manager.

Tip: If you use Google Analytics on your website, connect this account to your AdSense account to group your AdSense earnings with other data in your Google Analytics reports.

Your client sees less clicks in their Analytics

When you sell ads that lead to your client’s website then they might count fewer clicks in their Analytics website tracking that you recorded on your site.

A couple of reasons can come together here.

  • The most reliable way to track clicks on your site leading to your advertiser’s site is by adding utm campaign parameter to the target URL. See the Google UTM builder for more information on how to create them.
  • Clicks on your site are tracked before the user goes to your advertiser’s website. Depending on when their Analytics code is running, there might be a significant delay between both tracking events in which many users could simply bounce.
  • The Frontend tracking method in Advanced Ads also works with ad blockers. Some ad blockers and browser block Analytics though, so your advertiser might count less visitors.
  • If the advertiser asks visitors for consent before tracking them, they will cound fewer visitors since many of them might reject their consent or bounce.

See also How to check Google Analytics referral traffic.

If most of the items above are causing the discrepancy, then the advertiser’s server log should tell them how many visitors came from your website. That number should be higher than the one in Google Analytics.

Moving your blog

If you are using the Frontend tracking method and move your blog to another URL (e.g., after moving from development to production environment), you need to save the Advanced Ads settings again.

Tables not created

Developers can double-check if Advanced Ads created the tracking-related tables in their database:

  • wp_advads_impressions
  • wp_advads_clicks

Please reach out in case this happened so that we can investigate the cause in your system.

Debug tracking

Debug mode

When using the Frontend or Database tracking method, you can enable the tracking debug mode to see where your impressions or clicks are coming from. It logs every impression and click with additional information, like the exact time, IP address, page URL, or user agent.

You can find the debug mode under Advanced Ads > Settings > Tracking > Open database management > Debug mode.

Use the debug mode to resolve tracking issues
The ad debug mode is helpful to resolve tracking issues

The debug mode logs all impressions and clicks for 48 hours. You can also stop it before that period expires or use the manual debug mode described below to log a more extended period.

The debug file has the CSV format, which you can open in a plain text editor or spreadsheet software like Excel or Open Office.

You might need to update your privacy policy to inform your visitors about the information logged. When it comes to personal information, this concerns the log of IP addresses.

We have seen security plugins preventing the log file from being written. At this point, there is no general solution to this, but some plugins might have options to disable such a feature or whitelist specific files temporarily.

Enabling the debug mode manually

You can enable the debug mode permanently. Just enter the following line into your wp-config.php file.

define( 'ADVANCED_ADS_TRACKING_DEBUG', true );

You can also just track impressions and clicks for a specific ad by defining the constant with the ad ID as a value.

define( 'ADVANCED_ADS_TRACKING_DEBUG', 34 );

Setting the debug mode through the interface overrides the constant. E.g., if you set the constant to 0, the debug mode can still be enabled through the plugin options for 48 hours.

We recommend only enabling the debug mode for the period you are actively debugging and not running it permanently for privacy and performance reasons.

Reviewing the debug log file

The tracking debug file has the format advanced-ads-tracking-{URL}-{HASH}.csv. You can either download it through the Database Management page in the backend or find it physically in the wp-content folder.

Here are a few issues the log might help you to resolve:

  • If a certain number of impressions or clicks come from the same IP address, you are likely hit by a bot or manual click attack.
  • Many impressions or clicks made within seconds from the same IP address or user agent also indicate bot traffic.
  • All clicks should be accompanied by at least one impression from the same IP address recorded before the click. Otherwise, it could indicate a bot or broken impression tracking.
  • Do you see user agents that belong to a service? You can typically identify them by a URL or a name that stands out. Inform them if you don’t want them to crawl your site. If this is a bot, let us know so that we can add them to our general block list.

The tracking method can also help you to identify where impressions and clicks are made. Please find a list of the name in the column and what it means below:

  • “Frontend” => Frontend method is used
  • “Frontend with AJAX Cache Busting” => Frontend method + AJAX Cache Busting
  • “Frontend (Legacy)” => Frontend method through admin-ajax.php
  • “Frontend on AMP” => Frontend method on AMP pages
  • “Frontend on AMP (Legacy)” => Frontend method on AMP pages using admin-ajax.php
  • “Database” => Database method is used
  • “Database on AMP” => Database method on AMP pages

The “Execution time” column contains the time needed to write an impression into the database. This time does not include the latency that the request needs between your browser and the server, which can vary depending on the distance between both.

The column would include n/a if the impression could not be written to the database. If the value exceeds 100, then you might want to upgrade your hosting package.

Debug Google Analytics tracking

You can debug Analytics tracking in your browser error console.

Go to the Network tab and enter “collect” in the filter field. You will find the data sent by Advanced Ads to Analytics in the Payload tab.

When debugging clicks on ads, make sure to enable the Preserve log option (Chrome) in the Network tab so that the call is visible when you are forwarded to the target URL.

There can be multiple calls to the collect script, one for cache-busted ads and one for non-cache-busted.

At least in the Chrome browser, the data is displayed differently for Universal Analytics (properties starting with UA-) and Google Analytics 4 (property starting with G-).

Google Analytics 4

Search for the “Query String Parameter” and click on ”view parsed.”

You will find the ad name under “ep.event_label”.

Universal Analytics

Find Google Analytics data
Use the browser console to copy the Google Analytics data

You can copy the whole string into the following form to see which event data is submitted.

Event Category is always “Advanced Ads.” Event Action is either “Impression” or “Click.” Event Label is the ad.

Email reports

If emails are not sent at all, please check if your WordPress site can send them using one of the following methods:

  • Send the test email under Advanced Ads > Settings > Tracking
  • Try the password recovery function on the login screen
  • Use Settings > Tools > Site Health > Tools > Mail Check

If neither of the last two works, then the issue is with your WordPress site. Reach out to your hosting provider to solve this or try an SMTP plugin.

If email reports are sent too often or at the wrong time, disable the Tracking plugin and re-enable it again. This will reset the cron job that schedules the report.

Cron jobs

You can check the status of the cron jobs using the Crontrol plugin. After enabling the plugin, go to Tools > Cron Events and find advanced_ads_daily_email for the full report and advanced_ads_daily_report for the individual ad reports. You can trigger them manually for debugging.

Please notice that no ad reports are sent if you only use the Google Analytics tracking method.

Please also check if cron jobs are executed on your site at all. The mentioned Crontrol plugin can also help you with that since it lists the time when all cron jobs were last executed.

The Cron Logger plugin might also help get an idea in which order your crone jobs are running and helps to identify issues like receiving multiple tracking report emails. Please search for the advanced_ads_daily_email and advanced_ads_daily_report jobs and check if another plugin also triggers them.

For further debugging of the reports cron jobs, you can enable the cron debug file by adding the following line to your wp.config.php.
define( 'ADVANCED_ADS_TRACKING_CRON_DEBUG', true );

This will log all cron activity under wp-content/advanced-ads-tracking-cron.csv.

UpdraftPlus

If the advanced_ads_daily_email and advanced_ads_daily_report jobs are running during the backup process from the UpdraftPlus plugin, the email sending cron jobs might be triggered multiple times, and you’ll receive the AA Tracking reports repeatedly.

You can avoid this by using the crontrol plugin to adjust the time for advanced_ads_daily_email and advanced_ads_daily_report. Run them, for example, one hour before the updraft backup cron job starts.

Issues with the ajax-handler.php drop-in file

Our tracking uses the AJAX-handler drop-in file to manage and record AJAX calls for tracking. You can find the technical explanation right here in the manual.

If you encounter troubles using the Tracking add-on, please check this list of errors and solutions we identified over time.

Common Error Messages:

  • Access Denied
  • Forbidden
  • 403 forbidden
  • Error: Page not found
  • 404 Not found
AJAX-handler error
Example of this error message

Solution

Please ensure there are no server settings, optimization, or security plugins active, preventing file changes in the wp-content folder on your webserver.

Known plugins/services causing these issues:

  • EZOIC related
  • GoDaddy Security – Access Denied
  • KINSTA
  • LiteSpeed Cache
  • sucuri
  • Autoptimize

Changing the destination folder

The ajax-handler.php drop-in file is located within our wp-content folder. If you want to change this directory, please use these filters:

advanced-ads-tracking-ajax-dropin-path and advanced-ads-tracking-ajax-dropin-url

Please be sure you technically understand what you are doing here because a wrong setting can cause problems.

Subscribe to our newsletter and get 2 add-ons for free!

* indicates required

Other issues

Uncaught ReferenceError: advads_tracking_methods

If you see the error “Uncaught ReferenceError: advads_tracking_methods is not defined” in your browser’s error console then an optimization plugin like WP Rocket or Autoptimize, or an appropriate service on your server probably blocks the script.

WP Rocket

Please test if disabling the “Delay JavaScript execution” function in the WP Rocket settings helps. If so, check out our WP Rocket documentation for instructions on how to whitelist specific scripts.

Complianz

Whitelist the following scripts under Complianz > Integrations > Whitelist a script, iframe or plugin.

advanced_ads_pro_
advanced_ads_ga_uid
window.advads_passive
advads_tracking_adsCode language: JavaScript (javascript)

Make it better

Increase your ad management skills without spending more time.
Join over 150,000 publishers and AdOpts increasing their ad revenue.