Press enter to see results or esc to cancel.

Ad Impression and Click Tracking

PRO Ad Inserter Pro supports ad impression and click tracking. This enables you to monitor how many times each ad was displayed and how many times it was clicked. In the case you are displaying two or more ad options (A/B testing) you can easily determine which ad option has the highest CTR (Click-Through Rate).

To use ad tracking you need to enable it globally (at the level of plugin, tab  / tab Tracking), select click detection method (if available for your license type) and then enable tracking for individual code blocks (ads). When enabled, Ad Inserter Pro adds tracking code to each page where ads are inserted. Let’s first clarify some terms.

For tracking to work, code block must have a wrapping div (No wrapping style can’t be used) and page must be error-free i.e. no Javascript errors.


Impression is an event when code block (ad) is displayed. This is detected client-side in the browser with Javascript code after the page is loaded (assuming the Javascript is enabled in the browser). Therefore, impression tracking works also when the page is cached, but it doesn’t work when Javascript is not enabled, Javascript is not running due to some error or the page was not loaded properly. 


Click is an event when somebody clicks on the code block (ad). This is detected client-side in the browser with Javascript code (assuming the Javascript is enabled in the browser). Therefore, click tracking works also when the page is cached, but it doesn’t work when Javascript is not enabled, Javascript is not running due to some error or the page was not loaded properly.

However, ads come in various forms and not all forms support reliable click tracking. In general, there are two types of ads: simple banners with link and Javascript based ads. Javascript based ads (e.g. AdSense) create <iframe> HTML element which is isolated from the main page and doesn’t support click detection. However, with some advanced code it is possible to quite reliably “guess” when the user has clicked inside iframe ad. Therefore, Ad Inserter Pro (not all license types) supports two methods for click detection.

Standard Click Detection

This method can detect clicks on simple HTML banners with links and is available in all versions of Ad Inserter Pro. An example of banner code where clicks can be reliably detected with standard click detection:

<a href="" target="_blank">
  <img src="" />

Advanced Click Detection

This method can detect clicks on any ad code (including AdSense) but is not available in all versions of Ad Inserter Pro. Please note that impressions and clicks detected by Ad Inserter Pro might be different from statistics of ad networks. This is mainly because the way how impressions and clicks are counted differs for each ad network and ad networks may not count some events (e.g. invalid clicks for AdSense). However, the method is reliable enough to get CTR in A/B tests in order to determine which ad gets more clicks.

Tracking Settings

Tracking settings are available on the plugin settings tab ().

ad inserter tracking settings

To globally enable tracking click on the top right button (icon is green when enabled) and save settings. There are two independent tracking modes: Internal and External.

  • Internal tracking means using internal plugin statistics. Each event (impression or click) is sent to to the plugin (Ajax request) and you can use internal statistics described below to analyze impressions, clicks, CTR, A/B tests. This may introduce additional load to your database on websites with high traffic.
  • External tracking means using tracking via Google Analytics or Matomo (formerly Piwik) events. Each event (impression, click or ad blocking) is sent to the external tracking service where you can analyze them. Make sure you have Google Analytics or Matomo tracking code installed. You can place the tracking code into Header code (tab ⚙ / tab Header). To analyze events go to your tracking service (Google Analytics or Matomo) admin pages and look for events with category Ad Inserter Pro.

You can also track all pageviews (with internal tracking) and ad blocking statistics by device (internal and external tracking is supported). Check below for details. If you would like to test tracking and check statistics while you are logged in set Track Logged In Users to Enabled. Choose (if available) Click Detection method according to the explanation above:

  • Standard click detection can detect clicks only on banners with links and is available in all versions of Ad Inserter Pro.
  • Advanced click detection can detect clicks on any ad code (including Javascript <iframe> ads) but is not available for all license types of Ad Inserter Pro.

If you are using only banners then choose Standard click detection as it is the most reliable method to detect clicks. Use Advanced method only if you need to detect clicks on AdSense, Amazon, Media Net or other Javascript based ads, for example, to run A/B test with AdSense and Amazon Native Shopping Ads to determine which ad has the highest CTR.

Clear All Statistics Data clears all impression and click data for all code blocks. Use it only when you need to delete all statistics.

Pageview Tracking

When enabled, Ad Inserter tracks each pageview (page load). To see the (internal) statistics click on the Statistics button.

ad inserter tracking pageviews

Statistics show pageviews by device and, if ad blocking detection is enabled, also events where ad blocking was detected and ad blocking share for each device. Devices are detected based on Viewports settings.

ad inserter tracking pageviews adb

Ad Tracking

To track individual code block (or ad) you need to enable tracking for this code block. Click on the tracking button and save settings.

ad inserter tracking enable

Once the tracking for the code block is enabled, Ad Inserter Pro will insert tracking code on the page where this ad is inserted and will track impressions and clicks on this ad.

If you are using caching you need to clear cache before tracking can be used.

Make sure tracking is globally enabled (tab  / tab Tracking / button top right).

ad inserter tracking settings

Tracking Statistics

To see impression and click statistics for this block click on the statistics button.

ad inserter tracking toggle

This button toggles code editor and statistics display.

 ad inserter tracking statistics

Tracking statistics shows imperessions, clicks and CTR for the selected range including average value for the last 30 days. You can select one of the predefined ranges (last month, this month, this year, last 15, last 30, last 90 last 180 or last 365 days) or select custom date range. The statistics data is kept for one year. When you select a predefined range the data is loaded automatically, for custom data range you need to click on the load button to load statistics data for this range.

ad inserter statistics load

Sometimes you might get error message when trying to load data. This is usually due to expired security token (the page has been loaded for a while). In such case simply reload Ad Inserter Pro settings page.

ad inserter statistics error

Ad Inserter Pro supports also live tracking – you can watch in real time how impressions, clicks and CTR change when visitors visit your website. For this you need to enable Auto Refresh function.

ad inserter statistics play

When this function is enabled Ad Inserter Pro will reload data every 60 seconds.

Sometimes you may want to clear statistics data for some date range. To do this select wanted date range and click on the clear button. All the statistics data for this block will be deleted and the charts will show no data for this date range.

ad inserter statistics clear

When tracking is globally or just for this block disabled, you may still analyze stored statistics data. In such case there will be a small yellow sign indicating disabled tracking.

ad inserter tracking disabled

A/B testing

When code block (or ad) has two or more versions (using [ADINSERTER ROTATE] function), tracking statistics will show total data (impressions, clicks and CTR) for the block and data for each version. This way you can easily determine which version gets more clicks.

ad inserter statistics versions

Please note that there might be some slight imbalance between version impressions. The [ADINSERTER ROTATE] function randomly selects one ad on each page load so on long run you’ll get almost equal number of impressions for each ad version. However, the CTR will always be accurate as it is the ratio of actual clicks and impressions.

No version label simply means that there are also impressions or clicks where there was only one ad version or version was not detected (due to some error on the page). If you have defined names for the rotation options (in the rotation editor or directly in the rotation separators) they will be shown here in the legend.

You can also get impression, click and CTR charts for individual ad versions. Click on Details button to toggle version charts.

ad inserter statistics version charts

Ad Blocking Statistics

Ad Inserter supports ad blocking detection. When enabled, Ad Inserter Pro can track also ad blocking events. To see ad blocking statistics for individual code block click on the Ad Blocking Statistics button (on the tracking statistics toolbar).

ad inserter statistics adb

  • When ad blocking detection is not enabled (tab / tab Ad Blocking) all impressions are normally counted regardless whether the ad was blocked or not.
  • When ad blocking detection is enabled, default statistics show only impressions where the ad was not blocked. To count ad as blocked, ad blocking must be detected and ad height must be 0.
  • When ad blocking detection is enabled, statistics with ad blocking (Ad Blocking Statistics enabled) show all impressions and share of ad blocking events. In the case of ad rotation, ad blocking events are represented as one version (blocked impression).

ad inserter statistics adb charts