ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Geographically targeted website

February 07, 2011 6:03pm

Subscribe [3]
  • #1 / Feb 07, 2011 6:03pm

    I have a website that I need to be able to geo target specific content depending on the country the visitor is coming from. The problem of figuring out where the user is coming from has already been solved. Furthermore, in every template I can get the visitor country through a plugin I’ve developed. The issue I am facing right now is actually serving smart content depending on the geo location. It may also be helpful to know that I am using structure for the data on my website.

    I have a few questions, please feel free to answer any of them if you have any insight on this topic:

    1) Is there a way to have multiple content defined for the same page. For instance, say you have a contact page, and you want to be able to display local phone and address no matter what version of the site they are coming to.

    2) I can put conditionals in my templates that look at the country to serve different pieces of template code. Fors the most part I want to serve the regular template on each page load, but I also want to be able to override the template with a geo-targeted version every once in a while. Is there a good way to do that?

    3) All of our sites are in English, but we still want to localize for some words (i.e. color vs. colour). How have you guys done that?

    4) It seems like the MSM is for different websites on the same EE install, not different versions of the same website. Is that correct?

    I just want to stress that this isn’t a multi lingual site. Thanks in advance for the input. I look forward to your responses.

    Moved to CodeShare Corner by Moderator

  • #2 / Feb 08, 2011 12:25pm

    lebisol

    2234 posts

    1. you would have to tap into into something like ip2nation
    2. & 3.  take a look at http://www.putyourlightson.net/projects/multi_language but you would still need ‘multi-language’ approach to URL structure

  • #3 / Feb 08, 2011 2:41pm

    1. you would have to tap into into something like ip2nation
    2. & 3.  take a look at http://www.putyourlightson.net/projects/multi_language but you would still need ‘multi-language’ approach to URL structure

    Thanks for the reply. I must not have been clear in my first question. I already know what the visitor’s country is. Let me try explaining what I meant in my first question by creating a scenario:

    Let’s say, I know the visitor is from the UK. My US and UK website are almost identical, but a few special pages are different, like my contact page. When my UK visitors go to the contact us page, I want to display our UK contact information instead of our US contact information. The contact information is all stored in Structure (like the rest of our page content). How do I make that content different for my UK visitors? I know I can put a conditional in the template and include a different structure page, but are there other ways? Have any of you come across the problem, if so, how did you solve it?

    That second link looks promising, thanks.

  • #4 / Feb 08, 2011 2:57pm

    lebisol

    2234 posts

    Template conditions are the only way I can think of…and then either redirect to URL. So I would not worry about your technique being ‘wrong’.

    While US vs. UK is only ‘slightly’ different…never the less, they are officially different languages and therefor multi-lang site is what you are after. Quite honestly ‘language switcher’ or designated url works just as well as detecting it for the user. As end user, I much prefer knowing that there is a section dedicated to my language rather than being dependent on the site triggers to detect it for me. What if I am visiting the site from US but my language preference is UK? What language do you serve then? But offer me link to click on and I am set in seconds. 😉

  • #5 / Feb 08, 2011 5:52pm

    Ingmar

    29245 posts

    Thanks for the assist. Does that make sense?

  • #6 / Feb 08, 2011 5:59pm

    Thanks for the replies lebisol. I think I am just looking for a solution that doesn’t really fit the way EE works. Ultimately, I just want to have my content stored in a CMS. I then want a base or default set of content, and that content should always be loaded by default. The only time that content wouldn’t be loaded is if a special version of that page exists and the visitor qualifies to see that special version of the page. I know I can do this through logic in the templates, but I am trying to make this rely on the CMS as much as possible.

    Thanks again for the replies. I will keep checking back in case anyone has more input. Thanks.

  • #7 / Feb 09, 2011 8:08am

    Sue Crocker

    26054 posts

    In that case, let’s move the question over to the CodeShare Corner so others can continue to comment.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases