Add Google Analytics to Your iWeb Site

If you don’t subscribe to Apple’s .Mac you can’t use iWeb’s built in hit counter. Google Analytics is an alternative which does not show the counter on your web page, but you can see the statistics on your Google Analytics account page.


Then you need to add a bit of hidden code with your Google Analytics Account ID (like UA-8765432-1) to your web pages.


This is what the “Add Google Analytics” Automator Action is for.


Apples introduction to Automator is here but the steps you need to do is:


  1. 1.Download and install the action “Add Google Analytics”

  2. 2.Start Automator - you find it among your Applications - it makes a new empty Workflow for you.

  3. 3.Add the “Add Google Analytics” action and enter your Analytics Account Code.

  4. 4.Save the Workflow as a Finder Plugin.

  5. 5.Publish your iWeb site to a Folder

  6. 6.Select the Folder in Finder

  7. 7.Control-click the mouse to run the “Add Google Analytics” workflow

  8. 8.Upload your web site

  9. 9.Visit Google Analytics pages a day later when Google has updated the statistics which is not real time.

Watch the Screen Shots


Mobile Me

If you have a Mobile Me account you can publish as usual. iWeb stores the web pages on your iDisk, and you run the action directly on the files there.


Note: the automator action does not work (as in “does nothing”) if you have turned iDisk syncing on in System Preferences->MobileMe.



Aperture

If you use Apple Aperture, I have made a variant of the action which adds the analytics code to the web albums you can export with Aperture.

You download the Add Google Analytics to Aperture action, double click to install it and use it the same way as the action for iWeb



Next Time You Publish

You only have to do one single step extra before you upload....




Note:

The CDATA added to the original Google code it to pass the w3c validation tests.


Troubleshooting Google Analytics


If Google Analytics does not update after 24 hours

  1. Check that the code is on the web page - using the View Source menu item in Safari’s View menu

  2. Check that the analytics code runs, with Safari’s Activity Menu (under Windows). Look for the 35 (or so) bytes requested from www.google.analytics.com

  3. Check that the domain name of your site is the one Google Analytics is set up to check (no spelling errors)

  4. Check that your Google Analytics ID is correct - every dash, letter and digit must be right.

  5. And of course - visit Google’s support page for Analytics.



History


Feb 13 2008

Version 1.2 adds support for new style Google Analytics code (the old style can still be made).


June 3 2007

Version 1.1 fixes a problem with compatibility on comments on blog pages.


More Software From Echo One

DoubleTake

DoubleTake is the "nano" of stitching software. Drag & drop your images onto or into DoubleTake, arrange them, and check the overlaps. When you are done - save and perhaps copy and paste the result to iPhoto.


File Juicer

File Juicer lets you extract/recover images, video, audio and text from files, folders, flash cards and iPods.

File Juicer will extract images from PDF, PowerPoint, Excel or Word just as it will extract them from flash cards. It considers all files as the peel of an orange which can be removed and the contents extracted



Copyright 2007-2008 - Echo One || Contact Henrik Dalgaard at: support@echoone.com