Loading...
Skip to Content

Adding Geolocation Personalisation to Optimizely CMS with Cloudflare

Personalisation is a key component of creating engaging digital experiences. For Optimizely CMS, visitor groups offer a powerful way to tailor content to different audience segments. But what if you could take this a step further by using geolocation data directly from your Optimizely DXP hosting or Cloudflare?

That’s exactly what TechnicalDogsbody.Optimizely.CloudflareGeoLocationCriteria enables. This lightweight integration lets you use Cloudflare’s CF-IPCountry header as a visitor group criterion, making geolocation-based personalisation faster and simpler than ever.


What Does the Package Do?

The Cloudflare GeoLocation Criteria package allows Optimizely CMS to recognise the country of a visitor based on the CF-IPCountry header provided by Cloudflare/Optimizely DXP. This enables you to:

  • Create location-based visitor groups easily.

  • Eliminate the need for third-party IP lookup services.

  • Leverage geolocation data directly from Cloudflare, with minimal configuration.


Why Use Cloudflare for Geolocation?

Cloudflare offers a built-in geolocation service that appends the CF-IPCountry header to all requests. This is:

  • Fast The data is already included in the request headers.

  • Reliable Cloudflare processes billions of requests daily, ensuring accurate location data.

  • Cost-Effective No need for additional geolocation APIs or services.

By using this package, you combine the strengths of Cloudflare with the flexibility of Optimizely CMS visitor groups.


Getting Started

1. Install the Package

The easiest way to get started is by installing the NuGet package:

Install-Package TechnicalDogsbody.Optimizely.CloudflareGeoLocationCriteria

2. Enable Geolocation in Cloudflare

To use the geolocation headers, make sure Cloudflare's geolocation service is enabled in your account settings.

3. Configure Visitor Groups

  • Log in to your Optimizely CMS admin interface.

  • Create or edit a visitor group.

  • Add the Cloudflare GeoLocation criterion.

  • Select the countries you want to target, and you're done!


Use Cases for Geolocation Personalisation

  1. Country-Specific Promotions Show tailored promotions or banners based on a visitor's country.

  2. Localised Content Deliver translated or region-specific content for global audiences.

  3. Compliance and Regulations Adapt your website experience to comply with local regulations, like GDPR in Europe or CCPA in California.

Conclusion

With the Cloudflare GeoLocation Criteria package, geolocation-based personalisation in Optimizely CMS is easier and more efficient than ever. By leveraging Cloudflare’s reliable geolocation headers, you can deliver targeted, engaging content to your visitors based on their location—all while keeping your setup simple and fast.

Ready to enhance your Optimizely CMS personalisation? Get started today.

Andy Blyth

Andy Blyth, an Optimizely MVP (OMVP) and Technical Architect at 26 DX with a keen interest in martial arts, occasionally ventures into blogging when memory serves.

 
Andy Blyth