Geo-targeted content

Hi,

Is there a plugin or a tutorial for creating geo-targeted content? Can SS CMS handle that?

Thanks

It depends on the scope of what you’re trying to do. The Fluent module can provide translated versions of pages, and can be configured to deliver them based on things like the URL, accepted languages, etc.

If you wanted to add some geolocation to that too, it wouldn’t be tremendously difficult. There are various libraries around which can do it, and you should be able to hook that functionality into Fluent, or set up some kind of redirection. (https://github.com/DorsetDigital/silverstripe-smart-redirect/blob/main/src/Model/Rule/LocationRule.php has some examples of using Maxmind for geolocation in case it helps)

Thanks. Yes, my plan is to provide different content depending on the user’s location. I believe that showing, say, a different homepage for US users should be simple, right? But what about displaying different content? I mean, the “page” remains the same; what changes, for example, is a paragraph or text on that page. Is that a possibility?

That’s exactly what Fluent provides. The same “page” but with content that is specific to the locale.

So, what it would come down to is how you’d like to deal with the location part.

This page: https://github.com/tractorcow-farm/silverstripe-fluent/blob/5/docs/en/locale-detection.md

provides a bit of basic info about locale detection. Unless someone has already done it, you’d need to put together a locale detection class which used the Gelocation system of your choice.