BonFX

Typography & Graphic Design Blog

  • Facebook
  • RSS
  • Twitter
  • Blog
  • Books
    • The Preposterously Huge Book of Google Font Combinations
    • The Big Book of Font Combinations (Classic Fonts Edition)
  • About
  • Gallery
    • Monster Alphabet
    • Pen and Ink Cartoons
    • The Algorithm FX
  • Contact
You are here: Home / WordPress Blogging / How to get Google Analytics stats for today only with one simple click

How to get Google Analytics stats for today only with one simple click

September 22, 2009 by Douglas Bonneville

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): https://www.google.com/analytics/reporting/?reset=1&id=2539825&pdr=20090822-20090921
  • 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
That’s it! You can get the script directly from my server here. Then in your HTML, make sure you have this DIV (or SPAN or other element) ready to go:
<div id="ga-today"></div>
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… Good luck!

Filed Under: WordPress Blogging

About Douglas Bonneville

Douglas has been a graphic designer since 1992, in addition to software developer and author. He is a member of Smashing Magazine's "Panel of Experts" and has contributed to over 100 articles. He is the author of "The Big Book of Font Combinations", loves cats, and plays guitar.

Lost in UX like I was?

"What do all these terms mean?"

But then a cat showed me the UX way with simple definitions and funny visual examples.

Now, I remember them all!


Check out "UX for Cats"


Font Combinations Book

On Sale Now at
Amazon

HOW TO MAKE INSPIRED FONT COMBINATIONS (without spending all day clicking things).


Font Combinations Book  

On Sale Now at
Amazon / Barnes & Noble

Or get the PDF eBook version, INSTANT ACCESS, 40% off Retail, now at the BonFX Store

Need Font Pair Ideas? How about 7500 pages of them?

Fantasticaly faster than fiddling with finicky font file formats


Font Combinations Book  

Get the PDF eBook INSTANT ACCESS, now at the BonFX Store

Recent Inspirations

  • 50 essential UX terms you need to know, illustrated with… July 18, 2024
  • “UX for Cats”, the perfect fun little book for UX beginners May 22, 2024
  • User Research in UX January 1, 2024
  • Rapid Prototyping October 23, 2023
  • Error Prevention in UX October 23, 2023
  • User Engagement in UX October 23, 2023
  • Empathy in UX October 23, 2023
  • Visual Hierarchy in UX October 23, 2023
  • Fidelity in UX October 23, 2023
  • Consistency in UX October 23, 2023
  • A/B testing in UX October 23, 2023
  • Key Performance Indicators in UX October 23, 2023
  • Task Analysis in UX October 23, 2023
  • User Stories in UX October 23, 2023
  • User Surveys in UX October 23, 2023

Copyright © 2025 · BonFX

  • Blog
  • Books
    • The Preposterously Huge Book of Google Font Combinations
    • The Big Book of Font Combinations (Classic Fonts Edition)
  • About
  • Gallery
    • Monster Alphabet
    • Pen and Ink Cartoons
    • The Algorithm FX
  • Contact