
For all of you who ever wanted to display Google Analytics reports on your site without much hassle, I may have a solution for you.
Laid out below is a set of simple instructions as well as fla’s and swf’s which I developed that you can use to show your Google Analytics visitor overview report to drive potential ad revenue, give clients an easy way to see their own analytics without logging into Google, or any other positive reason. The method takes only 3 steps to setup and upload so it takes only about 3 minutes to complete this process.
Click Here to see a sample report!

STEP 1. Log into Google Analytics and get the “visitor overview” report. — The visitor overview report can be gotten by logging into Google Analytics, clicking on the “View Reports” for the desired site, and finally clicking on the “visitors” link in the left-hand navigation once you have chosen the site. Once you have clicked the visitors link you should have in front of your a page titled “Visitors Overview with three options below (Export, Email, and Add to Dashboard). Click “Export” and you will be presented with 4 different ways to save your report. Choose “XML” and save this file to your desktop as “visitors_overview.xml”. It is important that you save the file with this name as flash will look for that specific file name when it loads the data.
Side Note: To make this process more streamlined, Google Analytics can email you this report on a set schedule which you decide….to do this simply click on the email link and click “schedule.” This means that you’ll never have to log into Google Analytics to retrieve this report again.
STEP 2. Getting the flash files to display the data:
Select the appropriate flash file. Each file comes zipped with accompanying sample XML document.
Complete Summary – Download Here | View Sample
Site Overview Only – Download Here | View Sample
Page Stats Only – Download Here | View Sample
Lastly, simply embed the flash file in a web page and upload that with your “visitors_overview.xml” document in the same directory and you’re all set!
Get the FLA File!
If you feel like you can do a better job with this flash file, want to modify it, customize it, or just want to see how it works, click here to download the source fla file and enjoy.
Legal stuff below.
*The files on this page are released under no copyright whatsoever so feel free to do whatever you so choose. Please note that these files also carry no guarantee and owner is not liable for any damage that might be caused by usage or downloading of said files.




(9 votes, average: 4 out of 5)

27 users commented in " Show Off Your Google Analytics on Your Site "
Follow-up comment rss or Leave a TrackbackMyspace Layouts Free Screensavers Love Icons…
I didn’t agree with you first, but last paragraph makes sense for me…
Broken links on downloads and samples
sorry about that….all fixed now.
Hi
its not display data on .swf file.
i create folder on root directory and put .swf and xml file togeter, but when i see the page in browser it just display .swf file only without data.
any help will be great appriiated
pareh
run perfect
Thanks
Dom
Hi paresh16, when you exported the xml file, did you export from the main dashboard or from the ‘visitors overview’ screen because it will only work if you export the xml from the visitors overview screen in google analytics.
I seem to get this error….
I renamed my xml file to visitors_overview.xml and put them in the same folder in my directory.
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: visitors_overview.xml
at visitors_overview_fla::MainTimeline/frame3()
hey yayman, do you get the same error if you use one of the pre-compiled swf files that i have above for download, or does this happen to both the pre-compiled swf and the fla files?
hi Lukasz Karpuk
yes i exported it from visitors ovrview.
though it is not display.
can i have any smaple or suggestions?
waitng for your reply
paresh
Great tool, it would be good if there are some Docs or Wiki added on how to obtain my own XML files and what do I need to embed your Flash object
I would be happy to put together some docs on how to use it…just send what you want to know and i’ll post it here.
Thanks for the offer, for example, a readme file with some explanation of XML file, how does it fit the the flash code, also when I go to Google’s site, what do I do to generate the file for my specific site. Another good thing will be the date ranges, in my XML file, how do they fit the big pictures.
Thanks for considering.
The flash file fla is not opening in Flash 8. Can u tell me wat should i do.
The flash file was created in flash CS3 and is written in AS3. If you want, i can post an FL_8 file without actionscript and post the actionscript in a separate file but you would have to rewrite all the code back into AS2. Let me know if that’s something you would be willing to do and if so, i would be happy to post a link to your AS2 version as an option for those still using AS2.
“To make this process more streamlined, Google Analytics can email you this report on a set schedule which you decide….to do this simply click on the email link and click “schedule.” This means that you’ll never have to log into Google Analytics to retrieve this report again.”
But I would still have to manually upload this report, for the Analytics to be up to date on my website. Correct?
Now all I’m looking for is a script of some sorts that automatically checks the email-account to which the reports are being sent, and then to automatically upload it to the designated webspace.
Anyone any suggestions?
Hi beun.net, the answer to your question is yes, you would need to manually upload the file, but what you want to do is tricky and takes a lot of planning and the right configuration….that said, here’s something that might work for you (it’s a php solution):
1. This process should work on a pop3 email account and not a IMAPI or exchange account, so if you have one, good.
2. You have to check with your hosting provider and ask them if they allow php to connect to the email server and if yes, does it use SSL or TSL or another secure socket connection.
3. If you’re still ok, you need to find yourself a php class that can connect to a pop3 account, i did a 2 minute search and found one on phpclasses.org (http://www.phpclasses.org/browse/package/2.html)…i haven’t tried this class but it looks promising.
4. Once you get your class to connect to and read the mail server, you would need to write a script that will parse the emails and look for the email with google analytics xml file and parse the contents of that file to look for the attached xml doc (use can use a reg-exp to look for the attachment url….in my case the link in the email looks something like ( mime.pl?file=Analytics_www..xml&name=Analytics_www.freshwebtrends.com_20090625-20090725_%28analytics%29.xml ).
5. Once you get that link, simply use CURL or something equivalent to get the content of the file, so in my case, i would curl something like -> http://myemailserver.myhostingcompany.com/mime.pl?file=Analytics_www..xml&name=Analytics_www.freshwebtrends.com_20090625-20090725_%28analytics%29.xml) and read in the contents of the file and then save that file using fwrite to the desired visitors_overview.xml that the flash file is looking for.
6. Lastly, if you want this to be done say once a day, you need to set google analytics to email you once a day and set the php connection script to run as a cron job once a day as well.
If you create a Google Group that’s open access, but closed to membership, use that group email address, then the file should have a public url that you can then use for the flash.
Wow!!! this is fabulous. A real gem, thanx.
Hi, I know this is an old subject for you, but it is exactly what I need – to get the analytics summary into my site. But I cannot access the flash file source file (is it because Im using Version 6 Flash MX?), I simply want to point it to read the file at http://groups.google.com/group/dkpi – is there an easy way to do it – sorry I have no experience of flash at all! thanks.
so is the file path going to be http://groups.google.com/group/dkpi/visitors_overview.xml ?
Very, very nice. Any chance of getting a version where the grid on the site visitors allows for more than 2,000 a day? Say maybe up to 10k?
I am noticing that the line graph is not staying within the bounds of the box. for some reason “0″ is not on the bottom of the box it is the second line. So everything is shifted up? Also sometimes when I reload the page I am getting “NUMBER” where the data should be? Any thoughts?
This is nice. Any chance of doing what F_Jacobs said? I have the same problem where my visitor data goes above the site overview and date range. Any help on manipulating the .fla file or .as files would be wonderful… nonetheless thanks for this post
Hi Lukasz,
Thank you for this Flash creation its fantastic!
I have implemented it onto my website, and I am having a strange problem. Sometimes the Flash swf file loads on the web page, and most other times the file loads but stays on the first frame, which is a blank white image. I know this is the first frame because I have added text onto each frame to find out which one it was stopping on. I have tried changing the Action Script code slightly but I am having no luck! If you have any ideas I would be really grateful!
Many thanks, Rhianon
Oh I’ve fixed it now! I must have messed something up when I was in the fla file!
Cheers again!
If you don’t have extensive programming skills, you might be interested in this startup which allows you to place reports into your website with no programming:
http://www.embeddedanalytics.com
Check out EmbeddedAnalytics:
http://www.embeddedanalytics.com
Nice new service which allows you to embed reports based off your Google Analytics into any site.
Leave A Reply