GeoTargeting overhaul

logo-128x128Based on recent feedback, service instability and just my own displeasure with how Geo features work in general I’ve spend the past week overhauling the GeoTargeting features in AdRotate Pro. Fortunately this wasn’t all that hard an I think I’ve come up with better stuff using more reliable services and better use of your precious IP lookups.


maxmindI have finally figured out how to implement the MaxMind web API. Which isn’t all that hard but somehow I got confused by their service offering. Currently I have an account myself for testing an it works really well. So well that you can now also target states and provinces in AdRotate Pro. MaxMind as you may know is one of the best in Geo Lookups. Their database is super accurate. And it’s fast. Really f*cking fast. All good. For most advert publishers their services are very affordable too.
AdRotate Pro will work best with the ‘GeoIP2 Precision: City’ service. You can also get the ‘GeoIP2 Precision: Country’ option but then obviously you can’t go beyond targeting countries. There is also ‘GeoIP2 Precision: Insights’ but the extra information provided through it is not used.


Something I’m rather pleased with is the addition of cookies. As outlined here, AdRotate will use cookies for GeoTargeting. This means that you use much less requests. Making the most of your bought lookups. This is an important money saver but it will also contribute to more stable services. Last I talked to the administrator of FreegeoIP for example, he jokingly complained that since AdRotate uses his service his traffic more than doubled from approximately 300 million lookups to well over 600 million per month.

Cost comparison

AdRotate will support 2 premium services. The current GeoSelect from GeoBytes service and soon also GeoIP2 from MaxMind.
Here is a breakdown of what will work and what it will cost.

  MaxMind GeoBytes FreegeoIP
Cost per lookup $0.0001 $0.0004 FREE
Cost per batch $20/p 50000 $1/p 1000 N/a
States by ISO code


The update to AdRotate Pro will be available sometime in the next few days. I’m doing some final testing now. If you want to help test – Let me know.

Upcoming in AdRotate Pro and AdRotate

logo-128x128The past few weeks have been crazy busy with a huge influx in support tickets. I haven’t have too much time for actual development. But over the past week I’ve done a lot of research and am making some progress with some ongoing issues with overall services.


maxmindI’m not sure what’s going on but FreegeoIP hasn’t been all that great lately.
Online, offline, online, no SSL, offline again. It’s maddening.
As a result I have been in contact with MaxMind and they provided me with some tools and pointers to integrate their own Paid services into AdRotate. This will hopefully happen soon!
The service will be added as a third option to the current FreegeoIP and GeoSelect.

Cookies and Requests

Currently AdRotate uses *no* cookies. Not for anything. This will change in the next version.
This brings 2 big changes;

  • GeoTargeting requests will be brought down by atleast 50%
  • MySQL Traffic will be approximately 30-40% less

AdRotate will generate a number of cookies. GeoTargeting (if enabled) will be using a cookie which will last for 24 hours. So during that time. No extra requests should be made to your geo service of choice. Which makes the 50000 requests of MaxMind even more worthwhile :)

On top of that. AdRotate currently stores it’s tracking data in your websites database. This leads to a lot of MySQL traffic (Queries) which may slow down your site.
AdRotate will be storing this data in cookies as well, meaning *A LOT* less queries on your database.

Current changes for AdRotate Pro

  • [new] Cookies for GeoTargeting (24h)
  • [new] Cookies for Impression tracking (24h)
  • [new] Cookies for Click tracking (24h)
  • [fix] Wrapper code parsed twice on some ads
  • [fix] Removed broken WP filter that added ‘_’ in filenames
  • [fix] No more Geo Requests on wp-login.php
  • [fix] Mixed mode post injection now works as intended
  • [fix] Post injection now works for posts with multiple categories

Current changes for AdRotate Free

  • [new] Cookies for Impression tracking (24h)
  • [new] Cookies for Click tracking (24h)
  • [fix] Wrapper code parsed twice on some ads
  • [fix] Mixed mode post injection now works as intended
  • [fix] Post injection now works for posts with multiple categories

Impression and click limits for adverts?

logo-128x128Here’s a thought; Should the impression and click limitation be moved to the actual advert instead of being tied closely to the schedule?

Currently a schedule determines the maximum clicks and impressions of an advert. Only one problem with that, if you have multiple ads in that schedule or time period you seemingly still go over the limit. Because each advert sticks to your limit. So a schedule could potentially serve up 1000000 impressions if you have 10 adverts in it and set the limit at 100000. That *looks* kinda weird. But it isn’t as it’s exactly right and works as designed.

Alternatively I could just remote the total used up impressions and clicks for schedules – Which is much much easier and probably stops the current flurry of confusion about “ads” going over the limit. Your thoughts?
Personally I like to remove the visible stat from schedules so that you can’t rely on the wrong number anymore. It’s easier for development, easier to manage and should speed things up a little bit because of less queries.

On the topic of queries, should stats be made a bit less live where AdRotate gathers just stats, and every so much hours (maybe twice a day?) calculates actual stats in proper numbers so that every time you load stats it won’t have to calculate each number and sift through many thousands (tens of thousands…) of records?

Please post your thoughts below!

AdRotate Switch now available

logo-128x128Thinking of switching to AdRotate or AdRotate Pro and looking to get a head start?
AdRotate Switch may be of use to you. Easily Migrate your data from other advertising plugins such as Max Banner Ads PRO and Ad King Pro to AdRotate and/or AdRotate Pro.

Take a look at the plugin page;

AdRotate Switch currently supports 5 plugins to migrate data from. If your plugin is not supported, let me know. Perhaps I can add support for it in AdRotate Switch.

This looks sort of important for new users – Meet AdRotate Switch

And also potential users ;) It was suggested to me that I should provide tools for new AdRotate users to switch from their previous advertising plugin.
A copy of Max Banner Ads was kindly provided to make the first move. And behold, a wild AdRotate Switch appeared!

How will it work

Almost all plugins store data. This data can be read by any installed plugin. So I devised a simple system where AdRotate Switch will read data of compatible plugins and reformat it so that AdRotate can read it, then store said data in the AdRotate part of the database. The other plugin can then be uninstalled and removed and voila. With a few clicks you’ve moved your ads and campaigns to AdRotate. Almost ready to go.

Minimal setup

Obviously AdRotate will still require some set-up, but not having to set up groups, adverts and even keeping your stats (hopefully) will save you a bunch of time.

No clutter

AdRotate Switch will be a stand-alone plugin and will not be part of the main AdRotate plugins. Simply because not everyone needs these tools. There is no point to add bloat to AdRotate and AdRotate Pro. AdRotate Switch will be a “clean” plugin, meaning that it will not store data exclusive to AdRotate Switch. Just install it, run the migration tool you need and delete it. No fuss, no trace data.

Compatible plugins

If you have or know other advertising plugins that can be included in AdRotate Switch please let me know.
If at all possible I will include it in the plugin.