I'm receiving an array with empty values when trying to get visitor info using the Smart Map plugin and its Visitor Geolocation feature. I'm using MaxMind's free trial ($5 worth of queries) since FreeGeoIp.net is not recommended and I've double checked the plugin settings and cleared all caches. Looking at the MaxMind account there are no queries logged and my map/debug output has empty location values via PHP (screenshot). Working locally on a .dev domain, running Craft 3 RC and tried FreeGeoIp.net as well but to no avail.


{% set visitor = craft.smartMap.visitor %}
{% if visitor %}
  <pre>{{ dump(visitor) }}</pre>
{% endif %}


 array(8) {
  • Hmm. Could this be part of my problem? craft.app.request.userIP is returning string(3) "::1". A PHP config issue? Using MAMP Pro on macOS FWIW. Commented Mar 15, 2018 at 2:41
  • Good theory... Oddly, I just did some testing locally, and wasn't able to reproduce the problem. Hit me up on Slack via DM, and we can troubleshoot it together.
    – Lindsey D
    Commented Mar 15, 2018 at 4:20
  • 1
    Thanks for connecting on Slack Lindsey! I'll be sure to post an answer here when we get to the bottom of it. Great plugin support. : ) Commented Mar 16, 2018 at 17:14

1 Answer 1


Was using the MaxMind free trial and I didn't have the Web Service set correctly in the Smart Map plugin settings. It needed to be set to GeoIP2 City.

  • Glad you got it sorted! To be clear (for future readers), it needed to be set to "GeoIP2 City" because that was the package that you paid for. The dropdown needs to match your selected MaxMind subscription package.
    – Lindsey D
    Commented Mar 24, 2018 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.