Have you ever wondered how to determine the location of your visitors via a webpage or browser?
This bit of code will look at a users IP address and range and output the information.
Usefull for making your site feel tailored to local business needs, even if you are not based in the area.
copy and paste the code below, note the part Search Engine Specialists
change this to required message, so if you lived in Doncaster, it would read – “Search Engine Specialists Doncaster”.
Enjoy!

Code:
<script type="text/javascript">// <![CDATA[
  if (typeof(google.loader.ClientLocation.address.city) != null) {
     document.write("Search Engine Specialists "
	 + google.loader.ClientLocation.address.city + ", "
	 + google.loader.ClientLocation.address.region);
  }
// ]]></script>

Leave a Reply

You must be logged in to post a comment.