Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Google Analytics - Auto login

Posted on 2010-08-28
3
1,738 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
key press alert 2 32
Hide Table in merge 3 31
How do I show metrics with PHP or Javascript 6 32
JS Event Does not Trigger From File 2 26
This article discusses how to create an extensible mechanism for linked drop downs.
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
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 PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

856 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