Solved

Google Analytics - Auto login

Posted on 2010-08-28
3
1,727 Views
Last Modified: 2012-05-10
Hi,
I would like to create an auto login button to access Google Analytics for my customers, does anyone know if this can be done?  
0
Comment
Question by:sabecs
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
MrPete_ earned 500 total points
ID: 33549536
Just to be clear: you question is CAN it be done. Good thing because depending on what you actually want, getting it done might be easy, or rather tricky (and something you may or may not be qualified to maintain!)

It all depends on what you really want. Your question is not sufficiently clear:

* Do you want this button on your customers' computers/websites, or is this for your convenience on your computer?
* Are you wanting a button that logs into the Google Analytics website, or ???

Depending on your answer, there are several paths.

1) Browser Remembers

The easiest thing is simply to have your web browser remember multiple login id's/passwords.

Then when you go to login at www.google.com/analytics, you can popup the available login id's, pick one, click once and you are in.

This is something almost anyone can do.

2) Write some software

If you REALLY want auto-login buttons, that's a bit trickier. Essentially, you need some kind of script or code that will feed the login/password info to Google, as if you had filled out the login form.

To do that, you need to be a programmer (or have a friend who can do it.)

One of the best tools for accomplishing this kind of thing is, unfortunately, only available for FireFox. It is called GreaseMonkey. There's info about it here: http://www.greasespot.net/

GreaseMonkey makes it possible to automate all kinds of things that you would normally do manually in your browser. And a WHOLE lot more... a savvy programmer can fix almost any problem on any webpage!

There are tons of existing script examples. None that do exactly what you might want, but just for example there's a script that automatically pushes the "Access Analytics" button. It's here: http://userscripts.org/scripts/show/35588

There are other scripts that automate logins of various kinds, Just search for "login" :)

Hope that answers your question about IF it can be done... and even gives you some ideas on HOW to get it done.

If you need more info than that, please explain your question more clearly :)
0
 

Author Comment

by:sabecs
ID: 33555390
Thanks Pete for your help,

At the moment I use the form below which works fine if I have the correct hidden fields, but apparently Google changes them on a daily basis

https://www.google.com/accounts/ServiceLoginBoxAuth
<input type="hidden" name="GA3T" value="4oCGYxIWWGUE">
<input type="hidden" name="GALX" value="g2BycIQxWzI">

Is there a way to automatically go to https://www.google.com/accounts/ServiceLoginBoxAuth get the hidden fields and substitute in my script, can this be done perhaps using JavaScript, jquery or PHP?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<a href="javascript:gi('googleanalyticslogin').submit();">Sign in to mywebsite.com Analytics Account</a>The invisible form
<form id="googleanalyticslogin" action="https://www.google.com/accounts/ServiceLoginBoxAuth" method="post">
<input type="text" name="Email" class="gaia le val" id="Email" size="18" value="admin@ mywebsite.com" />
<input type="password" name="Passwd" class="gaia le val" id="Passwd" size="18" value="mypassword" />
<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">
<input type="hidden" name="GALX" value="g2BycIQxWzI">
<input type="submit" />
</form>
</body>
</html>

0
 

Author Closing Comment

by:sabecs
ID: 33874664
Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now