GeoMate helps you detect the location and language preferences of you visitors, and lets you set up fine-grained rules to help you redirect users to the correct site, or show location/language specific information in your templates.

GeoMate relies on self-hosted Maxmind GeoIP2 databases for geolocation, and no external services are needed to look up IP information. By default GeoMate use the free Maxmind GeoLite2 database, but can easily be configured to use commercial versions of the database as long as it's in the MaxMind DB file format.

You can get information about the user's location through the, craft.geomate.countryCode and template variables.

By configuring the redirectMap config setting, you can define the rules for what location or language information is required for each of your sites. If you want to automatically redirect your users to the appropriate site, you can enable the autoRedirectEnabled config setting, or you can use the craft.geomate.redirectInformation template variable to get the information inside your templates, and display a banner or popup to trigger the user to switch site.

GeoMate also provides a helper to build a site switcher, the craft.geomate.getSiteLinks template variable, and some twig functions, addOverrideParam and addRedirectParam, to add the necessary parameters to ensure that GeoMate picks up that the user has selected a specific site.

There's quite a few config settings that can be used to tweak stuff, so make sure you read through it to get an idea of what the defaults are, and how you can use them to your needs. Check out the documentation for all the details.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
Craft 3, Craft 4, Craft 5
Last release
June 13, 2024