All questions

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

Asked by karozieba on

Kkarozieba

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?

Was this helpful?

2 answers

Bbartek_w

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:

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.

Was this helpful?
Kkarozieba

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

NFNina Fournier

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.

Was this helpful?
Still have questions?