Map View (beta)

GoSquared Map View (beta) enables you to visualise your site's visitors on a world map in real-time. With an array of options that allow you to customise Map View however you want, here's your essential how-to guide.
How to get the map
If you've registered your site on GoSquared, you automatically have access to Map View. First, you'll need your site's account code, which is available from the Account Code section at the bottom of the "Tracking Code" tab in Settings.Then, access the following URL, making sure you insert your sites' account code in the right place:
http://www.gosquared.com/map/[ACCOUNT CODE]/
Cool! How do I make it sparkle with dots?
Easy. We have a simple API endpoint you can access to populate the map. Here it is:
http://map.gosquared.com/dot/?sid=[ACCOUNT CODE]&ip=[IP ADDRESS]
In this URL, you'll need to supply the site account code and the IP address you want to plot on the map. The account code is just the same one you used to load up the Map View interface, and the IP address is a standard IPv4 address. When given this information, our system will magically geo-locate that IP address and plot them on your lovely big map.
Can I test it out first?
Just include the test parameter in the API request, and our system will generate a random dot for you:
http://map.gosquared.com/dot/?sid=[ACCOUNT CODE]&test=1
Refresh this URL a few times to plot some dots on your map!
What can I use Map View (beta) for?
Anything you want! You don't just have to plot site visitors. You could plot any real-time data that has an IP address associated with it. So that could be anything from your website visitors, to users of your iOS app, to servers requesting content from your website. If it's got an IP address, it can be plotted on the map.
Why do I have to register a site with GoSquared to use Map View?
This is mainly for security reasons, so that other users can't gain unauthenticated access to your map view. To get started, just register your site with GoSquared to obtain an account code, and then that account code can be used to operate map view.
Advanced options
If you're after a bespoke visualisation, you can tweak some of Map View's settings. You can:
- Specify your own latitude & longitude co-ordinates instead of IP address
- Change dot size
- Change dot lifetime
1. Specifying latitude & longitude
If you're just so awesome that you already know the location information for the dot, you can tell Map View exactly where to place the dot. This can be achieved by including the lat and lon parameters in the API request:
http://map.gosquared.com/dot/?sid=[ACCOUNT CODE]&lat=[LATITUDE]&lon=[LONGITUDE]
2. Change dot size
If the default dot size isn't quite to your liking you can change it to whatever you want. To do this, include the ds parameter, with number of pixels for dot radius, in the URL for the map view interface:
http://www.gosquared.com/map/[ACCOUNT CODE]/ds=[DOT RADIUS IN PIXELS]
Note: Although highly amusing, setting the dot size too high doesn't create a very effective visualisation.
3. Change dot lifetime
If you've got tonnes of dots flooding into your map, you may want them to expire quicker than the default time of 60 seconds. Specify dot lifetime by including the to parameter with number of seconds until dot expiry in the URL for the map view interface:
http://www.gosquared.com/map/[ACCOUNT CODE]/to=[DOT LIFE IN SECONDS]
Naturally, these custom parameters can be combined in one URL:
http://www.gosquared.com/map/[ACCOUNT CODE]/to=[DOT LIFE]&ds=[DOT RADIUS]
Lastly
Remember this is a labs feature, and we're still experimenting with it, so things may get a bit whacky occasionally!