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 :)
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
<a href="javascript:gi('googleanalyticslogin').submit();">Sign in to AskApache.info Analytics Account</a>
The invisible form
<form style="visibility:hidden;" id="googleanalyticslogin" action="https://www.google.com/accounts/ServiceLoginBoxAuth"> <input type="text" name="Email" class="gaia le val" id="Email" size="18" value="askapache.info@gmail.com" /> <input type="password" name="Passwd" class="gaia le val" id="Passwd" size="18" value="googlerocks!" /> <input type="checkbox" name="PersistentCookie" value="yes" /> <input type="hidden" name="rmShown" value="1" > <input type="hidden" name="continue" value="http://www.google.com/analytics/home/?et=reset&hl=en-US" /> <input type="hidden" name="service" value="analytics"> <input type="hidden" name="nui" value="1" /> <input type="hidden" name="hl" value="en-US"> <input type="hidden" name="GA3T" value="oCGYxIWWGUE" /> </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!
SEO Agency implementation of Google Analytics is a good free way to monitor organic search engine traffic.
analytics urchin password account google administrator
Related Articles
- Login to Google AdSense using PHP
- Fetch Feed Subscribers from Google Reader with CURL
- Changing Any Password On XP
- Is Your Password Crackable?
- WordPress Plugin for Apache .htaccess Security
- Speed Up Google Analytics, use local ga.js
- Best Free Online Banking for Web Professionals
- Faster Form Submission and Processing with fsockopen
08.26.07 at 11:52 pm
Webanalyticsbook » Google Analytics auto-login Place a specific code for the button and the form….
09.04.07 at 2:06 pm
There are a few problems with that. Firstly is, of course, you need to password protect the page that sends that information as anyone could view it or log on to Analytics. But if you’re in an AdminCP then it makes sense not to have them log in twice.
Secondly, some browsers will warn that they’re submitting a form across domains, and that may confuse people or make them suspicious.
Lastly, Google may block referrers from different domains.
But it’s a handy idea, saves clients keep asking passwords and log-ins and I think I’ll use it on localhost to quickly access all my accounts.
09.10.07 at 8:29 am
The method used here is no longer needed. Google is now offering an API to all of their services via account authentication.
Quoted from Google:
“Here at Google, we welcome the development of applications that rely on and communicate with Google services. However, many of these services require that users log into their Google Accounts, and authentication by outside applications has been–until now–somewhat cumbersome. To improve this experience, we are pleased to offer alternatives for Google Account authentication.
Our goals in providing these alternatives are to enhance both performance and security, as well as to streamline the process for developers of client applications. As new options are developed, we’ll post them here.
Authentication options currently available:
Account Authentication for Installed Applications: The ClientLogin API lets you incorporate programmatic login into your desktop or mobile applications. This API incorporates CAPTCHA for greater security against password trollers.
Account Authentication Proxy for Web Applications: The AuthSub API gives your web application the ability to access a user’s Google services accounts without handling the user’s login information. This API offers a secure mode, in which the web application can register with Google for greater security.”
For more info, refer to:
http://code.google.com/apis/accounts/Authentication.html
10.03.07 at 11:07 pm
Thanks for the update All Knight Access! Google Rocks!
10.29.07 at 7:57 pm
I don’t care that google provides an API.
I found this first and it’s smooth! Why use web services when this works?
Thank you.
10.31.07 at 11:27 am
Very interesting. I found a php lib that was written that simulates POSTs to Google, however I noticed this is no longer working due to a google clampdown!
11.01.07 at 11:22 pm
I recommend using the Google API, if you are up to it :)
11.27.07 at 1:13 pm
As far as I can tell the API is not working for analytics (yet)…
When using the API for webapps, there is no scope parameter available for analytics; if there is one available, I have not yet found a person who knows what it is…
example: https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fwww.yourwebapp.com%2Fshowcalendar.html&
scope=http%3A%2F%2Fwww.google.com%2Fcalendar%2Ffeeds%2F&session=1&secure=1
12.06.07 at 1:33 am
hi, this is a great tweak for google services. thank you for sharing them. i would like to ask if you could do that with the free email that google offer using my own domain name.
i have sign up for their free email application and i thinking that it is cool if my user can login in our webpage. i have tried to copy the login form source code but google says an error. users need to sign-in at mail.google/a/antique.ph