Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.


CloudFlare GeoIP module

Recommended Posts

When visitors first come to your store, thirtybees tries to detect country and currency. It uses browser's language to do so, but this method is not very precise. Alternatively, you can enable build-in geoip functionality and use maxmind geoip database to detect country based on IP address. Unfortunately, thirtybees uses legacy (no longer supported) version of this database, so it has become outdated. 

If you are using Cloudflare in front of your server (as I do), you might know that cloudflare do GeoIP translation and sends this information to your thirtybees server in custom HTTP header. I don't know what database they are using, but I would it's some very expensive and up to date solution. It would be insane not to utilize this information. 

So I've developed a very simple module that uses this http header to set up customer's country and currency. It does so only on first pageview, when cookie does not exists yet

If you are using cloudflare as well, you can download and use this module for free: Cloudflare GeoIP

  • Like 4
  • Thanks 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now