I'm pretty sure the Google Analytics login are valid.
Still it gives me this error.

Yes, I did flush cache (and also did some cron...)

Ps. I first installed the latest dev. Once the error appears I uninstalled/deleted this, and uploaded/installed the beta. In admin/modules I still see the module labeled with 7.x-1.x-dev. So there is probably something wrong in uninstall procedure.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

twohlix’s picture

Check if your user and pass really are correct:

using drush:
drush vget ga_stats_email
drush vget ga_stats_password

and maybe
drush vget ga_stats_profile

alternatively you could mess with inc/ga.inc and change the messages reported to see which function its breaking in.

twohlix’s picture

Component: Documentation » User interface
Status: Active » Postponed (maintainer needs more info)
Balbo’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

You need to double save the page in order to create the ga_stats_profile variable. First time with user/pwd and second choosing the profile. Since I had just one analytics-profile linked to that mail I though it doesn't need another "save".

twohlix’s picture

Thank you Balbo for clearing that up. Time to rethink the UI maybe.

D2ev’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-alpha3
Priority: Normal » Major
FileSize
49.4 KB

i have account with email like dominicp@mysite.co.uk and i can access my google analytics account though google analytics login. But when i try to give the same email and password it is showing me "Invalid Google Analytics login."

I have tried with different google analytics account where i have used gmail email id and it is accepting the email and password.

D2ev’s picture

Status: Closed (won't fix) » Needs review
D2ev’s picture

found code which is creating the issue in /inc/ga.inc

  /**
   * Authenticate Google Account with Google
   *
   * @param String $email
   * @param String $password
   */
  protected function authenticateUser($email, $password)
  {
	// Updated by jec006 to handle apps accounts also
	if( stristr($email, 'gmail.com') || stristr($email, 'mail.google.com') ) {
		$type = 'GOOGLE';
	} else {
		$type = 'HOSTED';
	}

for email id like dominicp@mysite.co.uk it is taking type $type = 'HOSTED';
if i change it 'GOOGLE' then it works for me.

deanflory’s picture

I too am having an issue with it accepting my correct username & password for GA. My password and username are correct and are entered correctly but it still doesn't work/save the password in the ga_stats admin page.

The admin page DOES save the username, but the password field is blank after multiple submissions.

kristougher’s picture

Check this: http://code.google.com/p/gapi-google-analytics-php-interface/issues/deta...

It seems Google updated the authentication process.

kristougher’s picture

Tried with a patch. Works for me.

Shieeet’s picture

The patch worked for me as well.

markrenn’s picture

Status: Needs review » Reviewed & tested by the community

This patch worked for me too

jec006’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thank you guys, committed here: http://drupalcode.org/project/ga_stats.git/commit/57f5a10

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kpm’s picture

I just started noticing this behaviour. Not consistently, but today I've gone to the status page numerous times and if I run cron manually I get returned:

Invalid Google Analytics login.
Invalid Google Analytics login.
Invalid Google Analytics login.

The user name and password are correct. Perhaps google is making changes again...

iaminawe’s picture

I am still receiving this error on a fresh installation of this module - is anyone else experiencing this?

MacSaveNy’s picture

It seems to be working correctly. I had to log into google independently and authorize the module to access the account.

It alerted me in google that there was a suspicious login.... once I cleared that up the module worked flawlessly.

What a great module this is.

iaminawe’s picture

Thanks for the update - it seems to work correctly if you are logged into the same google account first. Appreciate your input.

ditcheva’s picture

I'm having issues with the login as well, and Google is also sending me emails that it has blocked a suspicious login request.

However, I can't seem to find a way to 'clear that up' as @MacSaveNy says. :-) I've tried to be logged into Google as I try to set up the login information in the ga_stats module, but that also doesn't work.

Could someone provide more detail in their steps, especially the part about logging into google to 'authorize the module to access the account'?

Thanks!

ditcheva’s picture

Sorry! I spoke too fast. Google did eventually walk me through a 'Was this you?' set of screens where I could select that the login attempts were valid and that the application should be given access to my account.

This happened after my 5th or 6th login attempt though, not right away!

All works well now

pinkonomy’s picture

I still have this issue using dev version of module.
I tried all stepts described before.
How can I solve this?thanks

pinkonomy’s picture

SOLVED :How i solved this:
You click on the email google sends you.In the email you click on http://support.google.com/mail?p=client_login link.
On the next screen you click on http://www.google.com/accounts/DisplayUnlockCaptcha link .Next you click on "Continue" .
Done!

I hope someone else finds this useful!

togbonna’s picture

Cool! #22 worked like magic.

Thanks!

itqan-2010’s picture

Issue summary: View changes

#22 worked for me thanks