I check Google Analytics a lot to see how this or that article is tracking. I’m almost never interested in what happened yesterday, but rather what is happening today. In Google Analytics, you have to click through several screens and drop-down menus to get to todays data. Right now it takes 6 clicks and 4 screens to get at the data I want. That’s too much!
I’ve written a small jQuery plugin that makes it easy to see only todays stats. It takes you right to your domain stats with info delimited to today. Nice!
How to install and use GA Today:
- Download (view then copy and paste) the code below and save as “ga-today.js” or some other name
- Go to Google Analytics and view the default stats for your domain and get the ID from the URI, towards the end but right before the dates (see the bold red number below):
- Set the variable “
domain_id” in ga-today. js to the value you just got from previous step
- Upload ga-today.js on your server
- Include the script in your HTML as any other jQuery plugin
- Make sure you have a DIV with an ID of “ga-today” somewhere in your HTML
Then in your HTML, make sure you have this DIV (or SPAN or other element) ready to go:
Edit any of these bits and pieces to get your desired link format or ID to insert the dynamic link into and you’ll be in business.
When it runs, you’ll see this:
However, this link won’t work for you, since it’s my site ID. Whether you are logged in to Google or not, your generated link will take you to the right place once your domain ID is inserted correctly.
I hope the code pasted here doesn’t translate back to something buggy. And one final note: the script is set to run in “no conflict” mode, so you may want to get rid of that construct in the first few lines of the script…