Technology, life, programming, travel and money.

Ad Logger ‘click logging’ plugin for WordPress

Ad Logger for WordPress is a new plugin for logging clicks on iframe adverts and other social network buttons. At the moment it can log Google AdSense / Amazon Associates adverts, and Facebook, Twitter and Google +1 social media buttons. It also has a ‘catch-all’ mode which will log any other iframe clicks.

Clicks stats in one place – You can get statistics for all these services individually but Ad Logger allows you to see all the clicks in one place. It will however give you different number; Ad Logger counts raw clicks, whereas your ad/social media provider will count valid clicks.

Raw click logs – With Ad Logger you can see the raw logs which will give you information that your ad/social media provider probably won’t allow you to see such as IP address, page referrer, and browser agent.

Reports – Ad Logger has an AJAX UI to allow you to move through the results easily. As well as seeing the log you can view reports showing the which browser, referrer, page, IP most of your clicks come from. And you can filter the results to show all the logs for a specific IP, page, iframe type, etc by clicking on the type icon, or the ⇓ arrows.

Click bombing protection – As it has access to the raw click logs Ad Logger can help you to combat intentional or accidental AdSense ‘click bombing’ by disabling adverts if too many clicks are registered. It can disable ads that you may have inserted using the Ad Injection plugin, or by dynamically hiding the div that you have put the adverts into.

Ad Logger’s main UI

Here is the main UI, from top to bottom you can see the yellow message bar which I use to highlight the latest updates, then the navigation buttons. To the right of the navigation buttons are the report links.
Next is the main log table – you can see it combines clicks from AdSense, Amazon Associates, Facebook, Twitter and Google +1. You can click on the type icon or the ⇓ arrows to filter your results.
Under the table you can set how many rows are shown at once.
Next are the boxes to select which iframes are logged.
Then the optional click blocking preferences.
Finally you can configure what information is shown in the log table, and what information gets stored to the database.

ad logger main ui

Example Ad Logger report

This is the type report and shows how many clicks occurred on each type of iframe. Here you can see that there were 27 clicks on Facebook like buttons, and 5 on Google +1.

ad logger type report

Filtered report

By clicking on any of the ‘type’ icons you can filter your results to just that type. Here I clicked on the Facebook icon and so am just seeing Facebook button clicks.

ad logger filtered

How does it work?

Ad Logger works by using JavaScript to monitor whether a click has ‘probably’ occurred. I say probably because this method isn’t 100% accurate. It is pretty good though. It notes when the mouse pointer has entered the iframe, and then listens for a ‘blur’ even which corresponds quite well to someone clicking on the ad/social button.

Ad Logger does not modify your original ad code, so hopefully won’t break your ad provider’s TOS. I can’t however guarantee this, so you have to make a judgement call as to whether you think it is safe for you to use.

Results are stored in a new table in your WordPress database. This table can be cleared of data at any time, and it will be automatically deleted if you uninstall the plugin. The plugin limits the size of the table to 100,000 rows (this will be configurable in a later release).

If you have configured click blocking then Ad Logger will use a cookie to count how many clicks have occurred. If the limit is reached then Ad Logger can then set another cookie which will prevent Ad Injection’s ads from being added to new pages, and/or it can remove the div containing the ads from the current page.

How much does it cost?

Nothing! £0, $0! You are however welcome to make a donation via the plugin UI if you find it useful. I have spent several hundred hours of my own time producing this plugin, which I have now released under a GPLv2 licence.

How do I install Ad Logger?

Ad Logger is available for free from the WordPress plugin repository.

The easiest way to install it by searching for ‘Ad Logger’ from the ‘Add New’ link in the ‘Plugins’ section of the WordPress UI.

Future planned features

Future planned features include being able to block adverts by IP address (which will work either standalone with Ad Logger, or in conjunction with Ad Injection), more awareness of other iframe types, and possibly the ability to log non-iframe events. E.g. other advertising/affiliate link clicks.


Reader Feedback

7 Responses to “Ad Logger ‘click logging’ plugin for WordPress”

  1. Simple and Usable Plugin!

    But now on hard test!

    Cheers.

  2. arie says:

    how i use this plugin on other cms or other web ,i not use wp…
    thanks..

  3. advancedhtml says:

    Hi arie, this plugin is specific to WordPress. I’m sure you could port it to another CMS, but that would take a fair bit of work.

  4. arie says:

    hi..thank for you reply.
    how to import it ?, is it easy? .. I do not understand a lot of programming languages,whether ‘advancedhtml’ to release a version for general html /php web?
    thanks ….

  5. advancedhtml says:

    Hi arie, if you wanted this to work on another CMS you’d need to find a programmer who knows about writing / porting plugins to your chosen CMS. If you were porting this to a PHP based CMS I’d guestimate that it might take around a week for a descent coder to do the port.

    I have no plans to port this plugin to any other CMS myself, but someone else is welcome to do it if they have the time.

  6. Shield says:

    Hi

    Thanks for the tips, nice artilce!

    I have just a couple of question and you might be able to answer and help me to clear my doubts.

    I´ve notice in the ad looger report some IP´s with this:

    «0.0.0.0 (could not retrieve IP)?» what that means?

    Are those types of IP´s unknow or with a pronxy protection? shell i worry about it?

    Using add injection will the plug in block or prevent this type of IP´s too, in a bomb click or invalid clicks, just like the others?

    Thanks in advanced

    Best regards

  7. advancedhtml says:

    Hi Shield,
    I am aware of the 0.0.0.0 issues. I think they will (mostly) be normal users. I just can’t work out how to get the script to always show the correct IP address!

    You can use Ad Logger in combination with Ad Injection to add some basic click bomb protection. The click protection is based on counting the number of clicks, and won’t take the IP address into account.

    Hope this helps.

Leave a Reply

Do NOT fill this !