* Google Analytics Chokes On Long WordPress URLs

So I’m turning off Google Analytics for now.

I just noticed a “broken” link on my published WordPress blog that was not broken when I proofread it. Here is how the code looks before being processed by the Google Analytics Plugin for WordPress from boakes.org:

<a href="http://www.freakonomics.
com/blog/2007/07/12/the-perils-of-popularity-or-how-is-a-frozen-
website-like-a-sick-person/">Reddit</a>

And here is how it looks with the Google Analytics plugin enabled:

<a  onclick="javascript:urchinTracker 
('/outbound/article/www.freakonomics.com');">
Reddit</a>

Part of the problem is that there is no built-in way for WordPress to truncate the %postname% permalink tag by default. My permalink structure is as follows:

/%year%-%monthnum%-%day%-%postname%.html

So if you like having the words from the post’s title be used to form its permalink filename (as I do), then you occasionally have to live with ridiculously long filenames. If there is a WordPress plugin that fixes this problem, one that allows you to truncate the %postname% tag, then I am unaware of it. But the ability to truncate the filename to some reasonable number of characters should be a feature of the default installation of WordPress.

So I get to make a choice. I can either have links to long URLs working or I can have Google Analytics working. I choose the former. So goodbye Google Analytics (for now).