Skip to content

Location

Visitors stores a place on each visit. Choose one location plugin at Configuration → System → Visitors (/admin/config/system/visitors).

Included plugins

  • None stores no country, city, or coordinates.
  • Browser language reads the region on the first Accept-Language value. en-US stores the United States. en stores nothing. This is the default.

The language tag is stored separately in location_browser_lang. It is not the place.

IP geolocation

IP geolocation is not included. Another project can provide a location plugin that looks up the stored IP address. When IP anonymization is on, that address is already masked.

Add a plugin

Put a class in Plugin/VisitorsLocation and implement VisitorsLocationPluginInterface. Mark it with the VisitorsLocation attribute. The plugin is listed with the Location radios after caches are cleared. Return NULL when the plugin has no place to store.