Google Analytics for Today: A Bookmarklet Google Analytics is a powerful tool that can help you understand your website traffic and how it’s changing over time. But what if you don’t have time to set up tracking code on every page of your website? Google has released a new bookmarklet that makes it easy to add tracking code to any page on your website. The bookmarklet, called GA Bookmarklet, is available at https://developers.google.com/analytics/devguides/collection/analyticsjs-bookmarklet/. Once you have installed the bookmarklet, all you need to do is add the code below to any page on your website: ga(‘create’, ‘UA-XXXXX-Y’); ga(‘send’, ‘pageview’); 1 2 3 4 5 6 7 8 9 10 ga ( ‘create’ , ‘UA-XXXXX-Y’ ) ; ga ( ‘send’ , ‘pageview’ ) ; ..


Like anybody that has a website, I love Google Analytics… but it drives me crazy that the default view is for the last 30 days when I really just want to see what has happened today. The only way to check for today is to manually change the date in the report, so I hooked up a bookmarklet to do that for me.

With a small modification, you can use the same bookmarklet for your own use. All you’ll have to do is replace the ID in the bookmarklet with the ID for your Analytics account. (Note that you could use this to your advantage to make separate bookmarklets for multiple accounts)

First, drag the following bookmarklet to your bookmarks bar:

Analytics Today Bookmarklet

Now you’ll need to figure out what your Analytics account ID is by logging into analytics and going to the dashboard for your account. Find the long number after “?id=” and save it somewhere.

Now open up the properties of the bookmarklet (This example uses Firefox, but IE works similarly)

Find the “YOURIDHERE” part of the text in the location bar, and then replace that with the number you saved from Analytics.

For those interested, here’s the bookmarklet in all it’s hacked together glory:

If anybody can think of a better way to accomplish this, be sure to let us know in the comments.