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
<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!