Sunday, February 6, 2011

Configuring Google Analytics for Google Docs

Google Analytics for Google Docs is an ongoing gripe for me.

Apart from the huge lack of clear documentation regarding setup and configuration, at best it seems to work sporadically; at worst, it simply doesn't work.

I have managed to set it up and get it working but not consistently, so if you choose to pursue this and you find it buggy, please do not 'blame' me as there are a host of complaints on both the Google Analytics Help Forum and the Google Docs Help Forum about how much this feature leaves to be desired in relation to it working (or not).

There are three steps to the setup, if you feel comfortable doing so, simply skip to the step that you are wanting to review.

  1. Create a new Google Analytics account for tracking Google Docs
  2. Google Docs settings and prep of document for tracking
  3. Finish setting up your Google Analytics tracking profile

Press onwards ...

Create a new Google Analytics account for tracking Google Docs

I took the approach of creating a new account. Log into Google Analytics and select the drop down at the upper right of the interface My Analytics Accounts and select Create New Account.


You'll be presented with a Signup page and signup button. Click it and continue to the next screen. On the next screen are the basics for setting up the new account.

Make sure when you enter the website url that you select https from the drop down option and enter docs.google.com as the domain.

What you choose to name the account is up to you. I kept the default account name for easiness.


You will be presented with another screen that then asks for the details of your name and your country location. Fill these details out as required.


Accept the Terms of Service and at the very least elect to share data with other google products. This assists various google products such as adsense, adwords, google docs, picasa etc to 'talk' with google analytics and vice versa.


Finally you will get to the screen with the Google Analytics tracking code. Grab a copy of the UA#, save it to notepad or similar temporarily (you need this for the Google Docs configuration). Then save and finish.



Google Docs settings and prep of document for tracking

Log into your Google Docs account and from the upper right Settings link, select Documents Settings from the drop down


Once in the settings, select the Editing tab. Be sure to tick the checkbox for Use Google Analytics to track the number of visits to your published documents and then enter the UA# that you copied from your tracking code in GA to the box provided, then click Save


Once back on the Google Docs home page, select the uploaded document you are wanting to track.


Select the arrow next to the Share button on the upper right of the page and select Publish to Web. Once you do this another box will open up click Start Publishing then Ok


Once you have accepted the Ok, another part of the box opens up. Copy and paste the link to the published document to notepad. You need to save it to finish the tracking setup in Google Analytics. (Ha! I bet you thought we were finished!)



Finish setting up your Google Analytics tracking profile

You're now on the final stretch! Go back to Google Analytics, and from the account overview page, select the account you created a little earlier. If its not visible in the table.. check the drop down at the upper right My Analytics Accounts and select it from there.


Once you arrive at the profile overview page, select Edit from the Action column on the right of the table. Then click Edit under the Check Status link at the top right.



Enter the published document url that you saved earlier from Google Docs, into the space for the default page setting


After 24-36hrs, you should hopefully start to see visitor data for your tracked document