Auto-Login to Google Analytics to impress Clients
Adding Google Analytics to clients' sites is a no-brainer, it ROCKS!
I have 100+ client web sites running Analytics and all of them have trouble-free (no password or username to remember) access to their site reports. Thanks to the method outlined in this post, my clients couldn't be happier.. about that at least :)
Special Thanks to Bowman Technology for coming up with a fix for problems people were having. I'm glad it still is a working technique, Thanks! BT.
Google Analytics Auto-Login Demo
Sign in to AskApache.info Analytics Account
5 Minute Install
Of course you need your own Google Analytics Administrator Account, if you don't already have one.
Then I add a non-admin user for each of my clients sites, making sure to only allow access to their individual accounts. I personally like using a naming system so that each new user's email address is domain.tld@gmail.com
...
In this example the username is askapache.info@gmail.com
for the site AskApache.info
, pretty easy to remember huh!
Now all you need is the code to let your clients login without a username or password, because they prefer to roll down easy street whenever possible.
You should be able to use the exact form code I have provided (view source), modifying only the username and password.
If you'd like you could use a Firefox add-on like Web Developer or Live HTTP Headers to view the form data. If you were really cool you would much prefer to use WireShark and view the HTTP protocol in detail. Basically you need to know the data that is sent to Google by the login form, then you can imitate that same data being sent by using a form on your own site.
The Code
The javascript is optional, you could just display the form if you want and use a form input to submit. The handy thing about keeping the form invisible and using a button with javascript is that you can have multiple hidden forms and multiple buttons. On the admin pages that I create for clients where I use this method, I have several other auto-login and other types of form submissions so its just easier.
The button
Sign in to AskApache.info Analytics Account
The invisible form
NOTE: I'm still waiting to hear from google whether or not they are OK with this method, so if anyone hears anything let me know!
« Advanced HTTP RedirectionPHP Sessions/Cookies On The Fly »
Comments