I mentioned before that I have a Google Analytics account. One of my cow orkers asked if they had a way to export information into Google Maps or Google Earth, and I said I don’t think so, it’s still in beta. But they do have a way to export information, so I hacked together a quick program to translate Google Analytics geo information to Google Earth’s KML format.
In Google Analytics, open Marketing Optimization, then Visitor Segment Performance. Click on Geo Map Overlay and you get their best world-map overlay. If you look at the upper right of the data window, you see an Export section, and the first icon is a T. Click it and save the data somewhere. That’s what I use to get the information for my site.
Compile analytics2kml.cpp (or Seiz’s modified version), or download my statically linked Linux binary here. See a copy of a converted file here.
Feel free to use my online version of the converter here.
See a screenshot of some results from this site here.
Like this utility? Browse my blog for more interesting things.
2006 November 27 Update:
Stefan Seiz sent a modified version of this short program back to produce slightly different visual results. Now you have two choices! Get his source code here.
I’ve updated the online utility to give everyone a choice for which version they’d like to use, regular or plus-Seiz. Heh heh. Man I crack myself up sometimes.
Update 2007 May 14
Apparently Google has taken it upon themselves to make a new interface, and I’ll be working out how to use the new interface with the analytics2kml converter soon. In the meantime, switch to the older interface (right after you log in) and use the old export function.
July 26 2007 Update
Well, Google has officially stopped providing the data this entire project was based on. Until they allow exporting of GEO data again, or provide their own KML output, we’ll just have to live with their decision. In the meantime, please write to Google and suggest KML output or to re-allow exporting of GEO data. Thanks for your support!
60 Responses to “Google Analytics and Google Earth”
|
|
Quoth Jacob’s Blog » Converting Google Analytics to Google Earth
June 15th, 2006 at 12:00 pm [...] I wrote a program to convert Google Analytics data over to Google Earth's KML format, you can even convert online. Head over to my Convert Google Analytics to Google Earth KML page and give it a try! [...] |
|
|
Quoth Adam S.
June 15th, 2006 at 12:54 pm Works great! Lots of fun to use and a handy way to visualize a long list of numbers. |
|
|
Quoth Gerald Buckley
June 15th, 2006 at 2:56 pm Hey, thanks for the tip over at the g-WH!Z blog. Appreciate that. I’ll be using your converter here in just bit to try it out. Thanks for thinking of doing this! |
|
|
Quoth Stefan
June 15th, 2006 at 4:58 pm Works like a dream and a great idea. Thanks. |
|
|
Quoth jcburns
June 15th, 2006 at 7:30 pm Well done! And yeah, Google Analytics should have a ‘kml’ button that makes all your hard work unnecessary. |
|
|
Quoth Matt
June 16th, 2006 at 5:44 am Great script! Works like a charm. |
|
|
Quoth Gareth
June 16th, 2006 at 11:14 am Excellent. What a great idea. I’m sure Google Analystics will push to include this in a future version. Works great. FWIW, I’ve posted my KML file on my Another Chance To See website for people to see. |
|
|
Quoth James Fee
June 16th, 2006 at 1:50 pm Way cool man! |
|
|
Quoth James Fee - GIS & ESRI Blog :: Checking out the Google Analytics to KML converstion tool
June 16th, 2006 at 2:02 pm [...] I have to admit, this really opens your eyes when you see how global everything is these day. If you have a Google Analytics account, visit Scurvy Jake’s Pirate Blog and run the code. [...] |
|
|
Quoth B-Star
June 19th, 2006 at 5:59 pm That is so cool! Nice work! Thankx for sharing! |
|
|
Quoth 蚂蚁的天空 » Yesterday Readings
June 19th, 2006 at 6:57 pm [...] Google Analytics and Google Earth # [...] |
|
|
Quoth Webmaster
June 21st, 2006 at 6:08 pm Heard about this on Ogle Earth blog and had to wait until my Google Analytics account got activated to try it out. It was worth the wait. Thanks for your hard work. |
|
|
Quoth Simão
June 23rd, 2006 at 2:22 pm Just excellent! |
|
|
Quoth Ian Davies
June 25th, 2006 at 3:46 am Wow! That’s fantastic - thanks so much for creating this program! |
|
|
Quoth A delicious learning experience… » Blog Archive » links for 2006-06-27
June 26th, 2006 at 5:48 pm [...] Google Analytics Viewers via Google Earth a converter to take the data collected by Google Analytics for where users are visiting your site and display the data as placemarks in Google Earth (tags: Google_Earth) [...] |
|
|
Quoth Reggie
July 2nd, 2006 at 9:57 pm Thanks for all of your work. It’s a great tool to have. |
|
|
Quoth Bull_UK
July 18th, 2006 at 10:39 am Great tool, the kml produced even opens in NASA World Wind, my personal preference as I’m an OS dev on the project. |
|
|
Quoth Webmonster
July 18th, 2006 at 5:43 pm Thanks, I’m glad it works elsewhere as well. |
|
|
Quoth Amar
July 26th, 2006 at 1:59 am Fantastic. Greta work! |
|
|
Quoth greips
August 3rd, 2006 at 3:54 am great work! |
|
|
Quoth Trevor Nederlof
August 18th, 2006 at 12:19 pm Thank you so much for this I found this method very effective to show people and have an impact. When I cross reference something such as a content page from top content to cities to see all the cities who have viewed the content that exported data doesn’t work unfortunatly. Is there anyway possible I could display those cities on the globe? Go ahead and email me if you want. |
|
|
Quoth R Pool
August 23rd, 2006 at 9:23 am I think this is great way to get into using Google Earth; I wouldn’t have known where to start without your help. My next problem is trying to figure out how to customize the display of the globe to my specific needs. FOr example, I want to be able to change the color of all the placemarkers, or perhaps all of those on one continent. It seems I should be able to select them where they are listed, perhaps make a folder or something, and change them all at once–and also be able to generate a list of those changed. I’d also like to be able to create a flat map as well. Thanks for your help! |
|
|
Quoth Lieven
August 28th, 2006 at 12:41 am Nice.., the day GA becomes a tool that can handle in real time stats, then this could be a very nice marketing tool:) |
|
|
Quoth Lieven
August 29th, 2006 at 1:56 pm ALWAYS A RECENT/UPDATED KML on my own site ONLINE : I linked Reget DL manager (https /user/pass) …every stat has exact url with paramaters ,auto schedule +batch to transform all stats into unique reports + converts to kml files + soon gonna edit some xml to show everything in a nice way ( UL also scheduled) |
|
|
Quoth Maarten
September 16th, 2006 at 6:29 am Best addition to google analytics I’ve seen so far. The normal Geo map overlay is useless since it doesn’t provide for zooming. This tool is great. Strange that the creative people at Google did not already develop this. |
|
|
Quoth Kinderfeestje
October 5th, 2006 at 2:20 pm Perfect, now I can see where my visitors are from. Way better than the normal map. |
|
|
Quoth Gaston
October 19th, 2006 at 3:02 pm Great job, This code makes worth to see where my viewers come from. I have to say, it didn’t work directly from the linux downloaded program, but via you web php it works great! |
|
|
Quoth Webmonster
October 19th, 2006 at 10:18 pm The binary may not work on some systems because of library differences. Sorry if it doesn’t work for any of you. The .cpp file should compile just fine, though. |
|
|
Quoth Matt
November 3rd, 2006 at 7:32 pm This works great…really allows the data to spread out and gives a better view of how many different places are accessing my site. Great work! |
|
|
Quoth Justin
November 4th, 2006 at 7:10 am Pretty cool stuff! |
|
|
Quoth AlasdairGF
November 10th, 2006 at 8:23 am I was so disappointed with the Analytics mapping… this utility helps an awful lot. Favourite thing: So easy! Really a couple of basic steps. Least favourite thing: Not really helpful for smaller-scale local mapping - though that’s probably the fault of the data provided by Analytics rather than the conversion. Thanks, Scurvy Jake! |
|
|
Quoth JW
November 12th, 2006 at 11:12 am Awesome! Once again, I’m proven that I’m not the smartest guy in the world. One thing…from a marketing perspective, if the ‘Places’ bar could show countries and expand to cities, it would help more to show to which languages a website should be translated than simply the ‘cities’ view does. |
|
|
Quoth Pat O'Malley
November 15th, 2006 at 7:26 am Great job! I was looking for something to give me a better view of my visitors geographically since Google Analytics gives too high level a view. Thanks for the script! |
|
|
Quoth Theodore
November 28th, 2006 at 9:34 am Hi All Experts, |
|
|
Quoth somnath ray
December 8th, 2006 at 1:16 pm Hi, this is excellent… i was so amazed that google didnt incorporate this into analytics in the first place. i have a question though.. the locations that it shows are the server locations.. is it not possible to pinpoint the exact ISp on the map? Best.. and an excellent job done.. congratulations |
|
|
Quoth Webmonster
December 9th, 2006 at 10:08 am Apparently Google Analytics only gets a general area for the IP address it records, probably because that’s all the more specific the information is. This may improve in the future, but for now we must be content with what we have. |
|
|
Quoth Faaborg
January 3rd, 2007 at 5:16 pm Interactive 3D accelerated ego tripping |
|
|
Quoth Ramon
January 4th, 2007 at 3:22 pm Scurvy Jake, thanks a lot, man! The data looks great in Mac OS X’s version of Google Earth. |
|
|
Quoth Webmonster
January 4th, 2007 at 4:47 pm Thanks, I appreciate you stopping by. Glad to hear it works in Mac, too. |
|
|
Quoth Bill
January 6th, 2007 at 8:58 pm Thanks! Nice tool. Is there some way to associate the ISP with the server? |
|
|
Quoth Webmonster
January 7th, 2007 at 10:35 am Not that I’ve seen, Bill. The data that comes from Google Analytics doesn’t contain much more than the Lat/Lon coordinates and the area name. |
|
|
Quoth Frank Taylor
January 10th, 2007 at 8:42 pm I’m using it again… |
|
|
Quoth Canuck
January 13th, 2007 at 6:15 am Very cool. Worked like a charm! |
|
|
Quoth Chris
January 22nd, 2007 at 6:01 am Nice work! Looks great in GE 4. Thanks for the tool. |
|
|
Quoth David
January 27th, 2007 at 7:20 pm Very nice. Finally a way to see all your traffic not just chunks of 500. |
|
|
Quoth RusslandJournal
January 28th, 2007 at 1:28 am Very interesting. This would be cool to integrate in Analytics. |
|
|
Quoth Shea
January 30th, 2007 at 5:16 pm Great tool, thanks for the time saver! |
|
|
Quoth Peter
January 31st, 2007 at 10:03 am Well what can I say - wow! This has just made a research project I’m doing at work much more interesting and intuitive. I’m looking into international development for an Arts festival and I’m hoping to be able to show where people actually came from along with where they looked at the web site from. This just cut out 90% of the work and the result is 90% better! On another note, I’d love to be able to see the Google Analytics data across time using Google Earth’s ‘time shift’ feature. Of course this would involve stitching together several exports from Analytics. Congratulations and thank you for a very useful tool! |
|
|
Quoth Webmonster
January 31st, 2007 at 10:22 pm Thanks, I’m glad everyone likes it so much! Since release, I’ve been published in a Japanese book on Google Earth, had new versions submitted to me, and tons of great comments. I hope this helps Google realize that the short development time it takes to tie Google Analytics to Google Earth is worth its weight in gold. Do you hear me Google? |
|
|
Quoth StefanSeiz.com» Blog Archive » Website Statistics in Google Earth
February 5th, 2007 at 2:56 am [...] Cord wrote a very nice little converter which takes a tab-text file, exported out of your Google Analytics Geo Map Report and converts it [...] |
|
|
Quoth Matt H
February 14th, 2007 at 1:04 pm nice work on this app, was nice this data on Google Earth. |
|
|
Quoth Travis Cooper
March 17th, 2007 at 10:44 am Your app is a godsend for my and my friend who can read the geo map report very well. Thank you so much! |
|
|
Quoth Nebojsa Stanojevic
April 7th, 2007 at 1:51 pm The best thing for trackin so far!!!!!!!!!!!! |
|
|
Quoth LB
May 19th, 2007 at 8:08 am i made simple java app for the new interface (detail: city level map overlay) http://www.thinktanksolutions.be/GA2GEConvertorNewInterface.jar |
|
|
Quoth snowland.se » Google: Analytics2KML
November 24th, 2007 at 6:13 am [...] Hittade ett inlägg om hur man kan göra om Google Analytics-data till en Google Earth-KML… http://bogomip.net/blog/google-analytics-and-google-earth/ [...] |
|
|
Quoth Statistiche di Google Analytics in 3D con Google Earth | spailab.net | spai paolo spinelli
November 29th, 2007 at 2:26 am [...] dei nostri siti conteggiate attraverso il servizio di statistiche gratuito Google Analytics. Jacob Cord ha sviluppato un piccolo programmino che riesce a convertire la funzione “Overlay carta [...] |
|
|
Quoth Johann Blake
June 16th, 2008 at 3:16 am A free web service is available that allows you to view Google Analytics data in Google Earth or in Google Maps. It is available at: http://www.mobilgistix.com/web-services/Google_Analytics/google-earth-analytics.aspx |
|
|
Quoth Webmonster
June 16th, 2008 at 6:13 am Finally! Thanks a bunch for this information. The only reason I wrote this application was because I couldn’t get my Analytics information into Earth. Now that it appears they export in KML format, I guess this project is truly dead… |
|
|
Quoth Frank Taylor
June 16th, 2008 at 10:43 am Where did you see they are now supporting KML? |
|
|
Quoth Webmonster
June 16th, 2008 at 1:52 pm Sorry, my bad. I guess I jumped the gun, I thought the XML export was in KML format. Turns out the website Johann mentioned just converts the XMl to KML, much like my program did. |
