2 Replies Latest reply: Apr 30, 2012 5:23 AM by M. Adey RSS

    Conditionnal content with geolocation

    M. Adey Community Member



      As part of my project, I must be able to display the logo of one of 20 companies and their contact information based on the geolocation of the visitor. I have a database of 250 lines that contains the first 3 characters of postal code corresponding with the company. By using the Google API and finding google.loader.ClientLocation.address.city zip code, I am able to find the company with the postal code of the visitor. It should not be precise.


      So is it possible to put this database in a webapp and be able to display the right information the first time the visitor visits the page. Also, when the visitor changes page, is it possible to have the logo that appears without having to reuse the Google API? (Cookie?)


      Solution anyone?


      thank you

        • 1. Re: Conditionnal content with geolocation
          Liam Dilley MVP

          Hi there,

          A few questions..


          - You want someone to log in and see their company logo? Or is it that somoene visits the site and based on their location the logo and content is different?

          - If the latter my question is then why? It is good to know your goals and what you want to achieve but also why, there may always be better options.


          Some things with BC:


          - You have a module tag that renders the country of the person viewing the site so with javascript and CSS you can show/hide content based on the country.

          - Nothing is in place with BC to go to the City and postcode level of the visitor.

          - You have a module tag that renders their the ip of the visitor. You could use that and have javascript and a service of somesort with the library of those to access. You would defiantly need in the sites privacy and information very clearly telling people that content is being driven to them based on location as well though.

          - Web apps currently do not interact with CRM Data other then know if a customer owns a web app item etc.

          - You can not show CRM information or custom CRM fields etc to the website without having been logged in first. If you log in with the same credentials as an existing customer you can then push CRM data, cases, orders, custom CRM fields to them.

          • 2. Re: Conditionnal content with geolocation
            M. Adey Community Member

            Thank you Liam, always good advises.


            The province where I live is divided into twenty administrative regions. For each region, a company is assigned. So when a visitor land on the site, I must be able to view the logo and contact information of the company from the specific region.


            What I understand is that I am not able to access CRM information without being in asecure area. It therefore leaves me with the option of an xml and javascript / jquery.


            Thank you