← All releases

wp-content/plugins/ambit/ambit.php

Ambit

Show different content by region without breaking your cache or logging anyone’s address.

== Description ==

Geo-targeting plugins usually ship a 60MB IP database, look up every visitor, and make every page uncacheable. Ambit reads the country header your CDN already sets, groups countries into regions you define, and varies on the region — a handful of cache entries rather than one per visitor.

No IP address is stored, logged, or written to the database at any point. The plugin knows a request came from a region and nothing narrower.

Where no header is present — a direct origin hit, a CDN that does not set one — content falls back to a default region rather than guessing. Guessing produces a Dutch price list for someone in Denmark and no way to tell why.

== Screenshots ==

Numbered the way they ship in /assets/. Click any one to see it full width.

== Installation ==

  • Enable country headers at your CDN. The readme covers the four common ones.
  • Install the plugin and define your regions.
  • Use the Region block, or the ambit_region() helper in templates.

Add the region header to your cache’s vary rules, or every visitor sees whichever region warmed the cache.

== Frequently asked questions ==

What if I have no CDN?

Then this plugin does nothing useful, and it says so on activation rather than silently defaulting.

City-level targeting?

No. That needs per-visitor lookup, which is the thing this plugin exists to avoid.

== Changelog ==

= 1.4.2 =

  • Fixed: the fallback region was applied before regions loaded, so the first request after a cache flush used the wrong one.

= 1.4.0 =

  • Region groups, so a rule can target the EU without listing 27 countries.