I figured out how to create a bookmarklet for Google Analytics that opened to immediately show only today's stats. I wanted to make a Google Chrome application shortcut for this to go along side my other Google Apps shortcuts, but the first problem is that it only creates an application with the current url, which displays today's info and of course will display yesterday's info tomorrow. I figured I'd edit the target to the shortcut and replace the url with the javascript I had. The second problem is the line of script is too long. Window's shortcuts target paths can only hold 290 characters or something like that. The path to Chrome as well as the script went past that.
What are my options at this point? I've scoured the web and wasted way too much time for such a small piece of my life, but I'd like to figure it out.
I know jimmy-squat about programming. I can sort of edit javascript, but not really write it. I used the YUI Compressor to try and shrink it down, but it didn't change much. I also tried using a url shortener, but they all add the http:// prefix and that screwed it all up. I read I could point to a bat file in the shortcut target, but couldn't figure out how to do that either... plus I figured there was an easier way to do this that didn't require any minor hacking, which I'd like to avoid.
I was easily able to bookmark the site in Chrome and replace the url with the javascript and it works fine, and that was half my goal. But I really would like to have this as a Windows shortcut and behave in the exact same way the other apps work because they remember the previous window size.
Any suggestions on an easy solution?
Here's the bookmarklet's script -
javascript:var d=new Date();if(d.getMonth()<10){var pad='0';};var t=''+d.getFullYear()+(pad+(d.getMonth()+1))+d.getDate();location.href='https://www.google.com/analytics/reporting/dashboard?id=HIDDENID&pdr='+t+'-'+t+'&cmp=average'
Also here's the path to different but pretty similar application shortcut from Chrome -
"C:\Documents and Settings\USERPROFILE\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --app=http://docs.google.com/a/MYGOOGLEAPPSDOMAIN/