FYI, I thought of another approach using HTML5’s localStorage feature. (The advantage over the cookie is that when you clean your browser’s cookies, localStorage values remain.)
I’ve written a blog article about it here:
Google Analytics: Exclude your own visits