I have the following requirement and am not sure how one can go about achieving this as no back-end scripting is allowed in BC
On every page a set of ad rotators are displayed based on the users location - this could be a casual user wandering onto the web site or a registered member.
There are over 400 advertising regions (lets just call them cities). When a user wanders onto the web site, we know the IP address and can then determine the city with external services.
Now that we know the City the person is from, we want to present the page with the correct Banner-ad.
It is obviosly not a good idea to load 400 banner adverts and unhide the one required.
Can anyone help me with this problem?
I am no expert on JQuery/JSON/AJAX etc, so some examples would be appreciated.
Thanks in advance
You can go this way:
-create a folder where you create pages for every banner, something like /banner/london.html, /banner/newyork.html and so on
-place one adrotator on each page
-on the template where you need to have the banner rendered insert the script you use to determine the true location of the user and translate that into the city name
-create a .js that takes the city name and jQuery.load() the corresponding page from the banner folder, here are a few examples of the load method - http://www.w3schools.com/jquery/ajax_load.asp
Hope this helps!
PS - you can even have a single page for all adrotator, each wrapped in a div with a unique "city" ID and load the div containing the needed adrotator, something like:
Europe, Middle East and Africa