Detecting user country to customise currency

I’m pretty new to using Cloudflare and after some pointers.

A client is about to launch a new product which is due to get some serious media attention (so they say…) at the same time. We’re looking to use Cloudflare to keep the order page running despite traffic loads.

We’ve created a very stripped back single HTML/CSS page linking to Stripe Checkout (their hosted solution) for payments and are relying on the back end code (requests passed to the upstream server) only for order history access and fulfilment.

We do however need to offer up different prices for customers in Europe, the UK or in the USA and rest of the world.

What’s our best bet to detect the user’s location without having to lose the caching of the page at Cloudflare. I know there’s a header that can be enabled for requests that do get passed upstream but anything similar available in cached pages to access through JS? Better to use a third party API to geolocate?

Appreciate any tips and pointers.

Thanks,
Steve

You can use Cloudflare’s Geolocation:

Thanks so much for replying.
I had seen that option in the Cloudflare docs - but I believe it doesn’t help when trying to have the page cached as I don’t think there would be any comms to the upstream server?

Cloudflare doesn’t cache page HTML by default, so it shouldn’t be a problem.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.