PHPackages                             formatd/geoip - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. formatd/geoip

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

formatd/geoip
=============

Neos integration for maxmind geoip2 client

v1.2.1(3y ago)0816MITPHP

Since Mar 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Format-D/FormatD.GeoIP)[ Packagist](https://packagist.org/packages/formatd/geoip)[ RSS](/packages/formatd-geoip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (10)Used By (0)

FormatD.GeoIP
=============

[](#formatdgeoip)

A Neos CMS Integration for the geolocation service geoip2 api client of Maxmind ([maxmind.com](https://www.maxmind.com/)).

What does it do?
----------------

[](#what-does-it-do)

This package provides a service-class and eel-helper to access the geo-information of a user (by analyzing the IP address with the maxmind api). Optionally you can integrate a prompt to redirect the user to the content dimension matching his current location.

Compatibility
-------------

[](#compatibility)

Versioning scheme:

```
 1.0.0
 | | |
 | | Bugfix Releases (non breaking)
 | Neos Compatibility Releases (non breaking except framework dependencies)
 Feature Releases (breaking)

```

Releases und compatibility:

Package-VersionNeos CMS Version1.0.x4.x1.1.x5.x1.2.x7.x, 8.xUsing the service in you own plugins
------------------------------------

[](#using-the-service-in-you-own-plugins)

Inject the IPLocalizationService into your class and call the method according to the maxmind endpoint (getCountry, getCity, getInsights). the corresponding model of the geoip2 library holding all available information is returned.

Using the service in fusion
---------------------------

[](#using-the-service-in-fusion)

To get de country iso code in lowercase call this eel-helper.

```
	${String.toLowerCase(FormatD.GeoIP.country())}

```

The eel-helper accepts an optional argument "key" (e.g. "continent.code") for direct access to the data provided by geoip2

Using the dimension switch prompt
---------------------------------

[](#using-the-dimension-switch-prompt)

To display a layer on your site telling the user to switch dimension if he is located somewhere else integrate this fusion prototype and place it where you need it.

1. Place fusion prototype where you want it in your site

```
	include: resource://FormatD.GeoIP/Private/Fusion/LocationBasedDimensionSwitchPrompt.fusion
	page.someWhereInYourSite = FormatD.GeoIP:LocationBasedDimensionSwitchPrompt

```

2. Integrate LocationBasedDimensionSwitchPrompt.js into your site js bundling (it requires jQuery)
3. Configure the mapping (which iso code to what dimension value) in the Settings.yaml (see configuration)
4. Make it pretty with css

Configuration options
---------------------

[](#configuration-options)

Set your maxmind credentials in the Settings.yaml

```
FormatD:
  GeoIP:
    geoIpUserId: 123456
    geoIpLicense: 'somepassword'

```

For local testing you can enable debugging and simulate your ip address

```
FormatD:
  GeoIP:
    debug:
      enable: true
      simulateIpAddress: '8.8.8.8' # example us ip (google)

```

To make the LocationBasedDimensionSwitchPrompt work you have to configure which iso code you want to redirect to which dimension value.

```
FormatD:
  GeoIP:
    locationBasedDimensionSwitch:
      dimensionName: 'country'
      countryIsoCodeToPresetMap:
        gb: 'uk'
        de: 'de'

```

Calls to the API are cached for one day. You can modify the default lifetime in your Caches.yaml

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~180 days

Recently: every ~94 days

Total

9

Last Release

1175d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb327c5b80466d2d0236e188879eb7bfefe44330e56fe7cc27b5417a5b9689ea?d=identicon)[formatd](/maintainers/formatd)

---

Top Contributors

[![bweinzierl](https://avatars.githubusercontent.com/u/30659291?v=4)](https://github.com/bweinzierl "bweinzierl (12 commits)")

### Embed Badge

![Health badge](/badges/formatd-geoip/health.svg)

```
[![Health](https://phpackages.com/badges/formatd-geoip/health.svg)](https://phpackages.com/packages/formatd-geoip)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[kaufmanndigital/gdpr-cookieconsent

A ready-to-run package, that integrates an advanced cookie consent banner into your Neos CMS site.

2540.7k](/packages/kaufmanndigital-gdpr-cookieconsent)[shel/neos-colorpicker

A plugin for Neos CMS which provides a colorpicker editor

1494.4k6](/packages/shel-neos-colorpicker)[shel/neos-commandbar

A commandbar (CMD+K) for Neos CMS

1614.6k1](/packages/shel-neos-commandbar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
