Check out maxmind.com for a cool IP geocoding database if you’re rolling your own analytics.
Where maxmind is $0.0003 per query. And my CloudFront concept is $0.0000015 per query.
The database is updated daily, there is no quality compromise, it is a database so unlimited lookups and it is licensed under CC-BY-SA 4.0 so it permits commercial use with attribution. It is a subset of our paid city level data. If you want city level data, we have the free tier on the API permits 50k lookups per month.
By the way, I already pinged you on Twitter about the database. :/