Link to home
Start Free TrialLog in
Avatar of tols12
tols12

asked on

Landing Page by Geographical Location

I am using Dreamweaver 8 to create our website. I have everything ready except one thing. I have three locations with my business. I have created three separate landing pages for each location. How do i setup my website so if someone in the area of one of my locations visits my site, they're directed to that specific landing page? Ex. I have locations in NYC, LA, Miami. When someone in LA visits my site, they're directed to my LA landing page. If they live in NYC, they're directed to my NYC landing page...etc. Also, if my main location were in NYC, i would want all other states to be directed to my NYC landing page. Does that make sense? What do i need to do to my landing pages (what codes) to set this up? Thanks!!
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

use geolocation APIs to fetch the client's longitude and latitude, and accordinly decide the landing page
http://code.google.com/apis/gears/api_geolocation.html

see this link for help on redirection
http://www.tutorialspoint.com/javascript/javascript_page_redirect.htm
Avatar of tols12
tols12

ASKER

Thanks for the quick feedback! I looked at both those sites. The first one looks like it gives me some good information on the "example" area. But is there a step by step that i can follow to apply this to my landing pages? It looks like the example will tell me how to look for the geo codes, but how do i put the codes i want on my landing page?

The second site doesn't really show me how to redirect based on location to different landing pages. Is there a step by step instruction? Or could you help me really quickly? It doesn't look too hard, i just don't understand the lingo on some of these sites.
<<but how do i put the codes i want on my landing page?>>
you don't need to put those codes in landing page, you will be fetching them at the onload event of your default landing page.
Each of your pages will have long-lat associated with it. At onload event of default landing page you will find out the client's lat-long. If the lat-long of client does not matches with lat-long of default landing page, then you will find out landing page associated with lat-long of client.  (probably through if else statement)
if you are able to find the landing page associated with client's lat-long, then redirect to that one. Else you need to show the default page.

Avatar of tols12

ASKER

Ah, ok. Now it makes a little more sense. So, how do i setup the longitude/latitudes for my landing pages? That first link you sent me had some codes, but there was a TON of information. Could you help translate some of that. I don't understand alot of the HTML lingo. Also, you mentioned if somebody visited that didn't match my longitude/latitude, i probably need to make an if else stmt. How do i do that?
SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tols12

ASKER

Ok, i tried setting up my pages with the above suggestions. I am having a hard time understanding the setup and exactly where i put things.
Avatar of tols12

ASKER

I still haven't resolved the issue. I will still need some help.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tols12

ASKER

I never really got it working. It is partially done. The answers were really confusing to follow.
Wow, you left this question without comment for almost a month and then gave a bad grade?  Answers were confusing??  Did you install and run the sample script I posted for you?  How was that confusing?  Why didn't you ask for more help before closing the question with a bad grade?  What did we do wrong that caused you to mark the answer down by a whole letter grade?