Google Analytics Easter Egg


 

Google Analytics

 

 

Google Analytics Easter Egg found by Daimto

I have been working with the Google APIs now for almost two years. I have been writing tutorials here for you for almost a year now. You may wonder how it is that I am able to write these tutorials, well that is simple. I actually read the documentation. The documentation for the Google APIs is some of the best documentation that I have seen in my 20 years as a programmer.
The Google API documentation has quite simply become my bedtime reading.  At night I pick a random topic and start reading until I am tired enough to fall asleep. I find the most interesting things buried deep in the documentation that no one knows about.   In truth I gets at least one person knows about it the one who originally wrote the documentation, probably a few hard-core nerds, and me after I read it. Which I guess turns me into a hard-core nerd I can live with that.

Last night I ran across something that made me go “?” I was on my tablet so was unable to do anymore digging into it.

Google Analytics Easter Egg

There is no way that works right?   Here is the link from did..  Here is a hint.  Authenticate it then click Get data.

Google Easter Egg

 

André Mafei was kind enough to remind me exactly where this came from.   It comes from an old game called Street Fighter

Is it in the API?

You know you want to know if its part of the API don’t you?

https://www.googleapis.com/analytics/v3/data/ga?ids=ga:[viewId]&oauth_token=[authtoken]&dimensions=ga:fighterName1,ga:fighterName2&metrics=ga:roundsWon,ga:punches,ga:kicks&filter=ga:fighterName1==Ken,ga:fighterName2==Ken;ga:fighterName1==Ryu,ga:fighterName2==Ryu&sort=-ga:fireballs&start-date=2014-08-01&end-date=2014-08-01

returns :
{“error”:{“errors”:[{“domain”:”global”,”reason”:”badRequest”,”message”:”Sort key ga:fireballs is not a dimension or metric in this query.”}],”code”:400,”message”:”Sort key ga:fireballs is not a dimension or metric in this query.”}}

remove sort returns:
{“error”:{“errors”:[{“domain”:”global”,”reason”:”badRequest”,”message”:”No such dimension(s): ga:fighterName1, ga:fighterName2\nNo such metric(s): ga:roundsWon, ga:kicks, ga:punches”}],”code”:400,”message”:”No such dimension(s): ga:fighterName1, ga:fighterName2\nNo such metric(s): ga:roundsWon, ga:kicks, ga:punches”}}

 

You know i had to try.

Conclusion

This is not part of the API, its just something they added to the Query explorer tool.    Reading the documentation is useful.