Support

Admin Tools

#30707 GeoLocation

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 19 January 2019 17:17 CST

jhoefs
Hello, thank you in advance for your reply and help.

I am implementing GDPR compliance on my website, I was exploring different ways of doing it that had a small overhead (Michael Richey's EU compliance plugin is great, but adds over 800kb)

So am going to do a simple custom job - with most of the geolocation services, this means a paid resource if you want https. I noticed that Admin Tools has, integrated within it, geolocation possibilities using MaxMind. Since that is already integrated, I'd like to use that - what integration are you using for that i.e. what code specifically checks the IP? I will use the same for my GDPR compliance.

Best,

Dr. Jonathan C. Hoefs

nicholas
Akeeba Staff
Manager
Hello Jonathan,

I would recommend against using IP geolocation for GDPR compliance for two reasons:

  • The most important is the legal aspect. All citizens of the European Union get GDPR protection no matter where they are currently located. A German citizen in New York gets the same GDPR protections as a German citizen in Berlin.
  • Even if legality wasn't an issue, geolocation services offer an accuracy ranging from 95% (free version) to 99% (paid version). That's a lot of people whose location is reported wrong. Things get even more complicated when people are on planes and ships; in those cases the accuracy is exactly 0%.


If you really want to shoot yourself in the foot you can use the MaxMind integration services provided by our GeoIP plugin. The plugin automatically loads the AkeebaGeoipProvider class (found in plugins/system/akgeoip/lib/akgeoip.php on your site). You can instantiate an object of that class and call getCountryRecord.

Quick example:
if (!defined('FOF30_INCLUDED') && !@include_once(JPATH_LIBRARIES . '/fof30/include.php'))
{
  die('You need to have the Akeeba Framework-on-Framework (FOF) 3 package installed on your site to use this component. Please visit https://www.akeeba.com/download/fof3.html to download it and install it on your site.');

  return;
}
// e.g. 2.84.1.2
$ip = FOF30\Utils\Ip::getIp();
$geoIP = new AkeebaGeoipProvider();
// e.g. 'GR'
$countryCode = $geoIP->getCountryCode($ip);

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!