# Strapi has no user segmentation at all, how are you doing geo-targeted content?

Asked by karozieba on 2025-03-19. Tags: strapi, personalization, geo, audiences.

client wants different homepage sections for visitors from Germany vs
Poland. Strapi side is fine, content is modeled. Problem is targeting.
Strapi has zero native segmentation. No audiences, no geo, nothing.

two options on my desk right now:

1. build geo middleware myself (IP lookup, header, pick content)
2. use something off the shelf

leaning towards not owning IP databases and edge cases forever. what do
people actually ship for this?

## 2 answers

### Answer from bartek_w (2025-03-19)

Those are indeed the two paths, Strapi itself gives you nothing here so
it is custom middleware or an external personalization layer.

We went off the shelf with Croct after maintaining a homegrown geo
middleware for a year (the IP database updates alone made me regret
it). The model is that your Strapi dynamic zones and components map to
Croct slots, and audiences are evaluated in real time. Location is one
of the built-in signals, there are 100+ of them, so geo needs no
infrastructure on your side.

An audience is just a CQL condition. Yours would literally be:

```cql
location's countryName is "de"
```

evaluated per interaction, with a second audience for Poland and the
Strapi content as the fallback for everyone else. The client can then
edit the per-country sections without a ticket, which for an agency
setup is half the value.

#### Reply from karozieba (2025-03-20)

the IP database maintenance point hits home. thanks, will demo this
to the client

### Answer from Nina Fournier (2025-03-20)

If you do go the middleware route anyway, budget for the boring parts
up front: VPN and proxy traffic, IPv6 blocks with stale country data,
and caching (your CDN must vary on country or you will serve German
content to Warsaw). None of it is hard, all of it is forever. That
recurring cost is the real comparison point against an off-the-shelf
layer, not the initial build.
