• Skip to primary navigation
  • Skip to content
  • Skip to footer
Homepage
  • Services
    • Digital Marketing
    • Web Design & Development
    • Web Application Development
    • Print Design & Branding
    • Content Strategy & SEO
    • Services Overview
  • Industries We Serve
    • Businesses & Organizations
    • Government Agencies & Education
    • Enterprise & Franchise
    • Industries Overview
  • Project Showcase
  • Meet the Team
  • Blog
  • About Webspec
  • Let’s Talk
  • Home
  • Blog
  • The Joys of Geolocation

The Joys of Geolocation

Written by Gene Wilder June 27, 2012
Categories: Custom Programming

2 min. read

Knowing your audience is key when putting together your company’s website, and one of the first questions you’ll want to ask new visitors is, “Where are you from?”

To answer that question, we can leverage the power of geolocation. Geolocation is a method of establishing your visitors’ geographical location in order to customize each user’s experience. The technology behind geolocation is actually as old as the Internet itself. Each computer connected to the Internet is assigned a number called an IP address. This number is used by web servers to correctly route responses and requests to/from each site visitor. And because of the way these IP addresses are distributed, it is possible to gather real-world geographical data just by examining a user’s IP.

Say you want to provide a map of all your stores on your website, and you want to show the locations closest to your user. By geolocating your user first, you can load up the map with nearby results right away. Sites like DealChicken.com use geolocation to route their users to the appropriate city/state page of listings the moment they enter the site. If your site has advertising, geolocation is a great way to target ads to a specific segment of your user base.

In the past, setting up geolocation on your site meant maintaining a huge database of IP addresses and map coordinates, but thanks to a web service called geoPlugin (and others like it), those days are well behind us. We can make a request to the geoPlugin service simply by visiting a web page:
http://www.geoplugin.net/json.gp

This page gives us a well-structured dataset we can immediately use to gather geodata. The best part is, the service is free to use for up to 100,000 daily lookups!

Now we know how to use this powerful tool, it’s important to consider when not to use geolocation. The techniques we’ve discussed here cannot reveal a user’s identity or even their street address/house number – when taking orders for products for example, you’ll need the user to enter a valid shipping address instead of relying on any geolocation data you’ve gathered. Also, if you have a mobile version of your site, geolocation by IP address on a mobile device may produce unexpected results, though solutions like the HTML5 Geolocation API and device-specific GPS services help to bridge this gap. As with any tool, IP-based geolocation is not suited to every job, but it can prove to be a valuable part of your user targeting strategy.

Geolocation is a quick, unobtrusive way to enable your site to show relevant content to your users more quickly. If you have ideas about using geolocation in your next web project, we’d love to hear them!

Webspec's mascot Gene Wilder

Gene Wilder

Gene Wilder stands guard in our main conference room as a constant reminder not to take ourselves too seriously. His counterpart, Meriwether Lewis, ventures onto the front desk each day in his rowboat, a metaphor for our daily journey to develop the most perfect products we can. Come in and visit them!

Questions about what you’re reading?
Feel free to Contact us

Post navigation

« Previous Post
Next Post »
Webspec Homepage

Making amazing things in
the heart of the midwest.

  • The Design Group
  • Edje
  • Build This
  • Careers
  • Contact
  • Privacy Policy
  • Terms of Service
  • Iowa Sign Company
Call us at 515-334-9544
Email us at sales@webspec.com
Find us at our office at

5907 Meredith Dr.
Urbandale, IA 50322

  • Follow us on Instagram
  • Follow us on Twitter
  • Follow us on LinkedIn
  • Follow us on Facebook

© 2001-2023, Webspec / All rights reserved. Iowa Web Design by Webspec