3 Answers
3

You can put your JS logic into external JS file and attach it to CMS page using layout update at the "Design" tab. Then depending on you visitors country you can load the content of appropriate CMS block with ajax.

I can recommend my GeoIP extension. You can use it to detect visitors country on Magento side and then add a corresponding block to your page:

First of all, disable WYSIWYG editor. Better yet, make it so that WYSIWYG editor is disabled by default: System > Configuration > General > Content Management > WyYWIWYG Options > Enable WYSIWYG Editor and set it to Disabled by Default

Now that we can enter stuff directly:

<script type="text/javascript">
if (geoip_country_code() == 'GB')
{
alert("Hello, you are in Great Britain");
}
</script>