Jump to content

Google Analytics APIs


Recommended Posts

Hello folks,

I have spend my time with the Google Analytics APIs module, include in the prestashop upgrade, v.1.5.4.1

And have the follow prob:

 

 
Project Default Service Account
 
Deze app wil:
 
Offline toegang hebben
 
AccepterenAnnuleren

 

 

When I click on Accept, the follow error comes up:

 

Cannot retrieve test results

 

And in BO even: Notice: Undefined index: id_ps_advice in /home/admin/domains/erotiekfabriek.be/public_html/modules/gamification/gamification.php on line 148

 

Have someone any solution where I can find the solution?

 

Best Regards,

Generaal

Edited by Generaal (see edit history)
Link to comment
Share on other sites

what youv'e got in line mentioned in error code?


			return '<script>
				var admin_gamification_ajax_url = \''.$this->context->link->getAdminLink('AdminGamification').'\';
				var current_id_tab = '.(int)$this->context->controller->id.';
			</script>';

this is what i;'ve got, i suppose that you've got some different code?

Link to comment
Share on other sites

Hi there,

 

I think i have the same error on ps 1.5.6 (last version), after configuring client id, secret and profile, hit save and authenticate, redirects to google app page for accept the permissions, after granting redirects back to psBO with a green window "google api authorization granted" and a red one "Cannot retrieve test results".

Google analytics account stil does not work from yesterdays updates i think.

 

Any ideas?

 

Thanks

 

Edit :

The problem solved after updating google analytics platform from google

Edited by antoniskp (see edit history)
  • Like 1
Link to comment
Share on other sites

what youv'e got in line mentioned in error code?


			return '<script>
				var admin_gamification_ajax_url = \''.$this->context->link->getAdminLink('AdminGamification').'\';
				var current_id_tab = '.(int)$this->context->controller->id.';
			</script>';

this is what i;'ve got, i suppose that you've got some different code?

 

Hello Vekia,

 

I have this on line 148:

 

$css_str .= '<link href="http://gamification.prestashop.com/css/advices/advice-'._PS_VERSION_.'_'.$advice['id_ps_advice'].'.css" rel="stylesheet" type="text/css" media="all" />';

 

 

And I have also the follow error when I hit the Catalogus tab > Product  and even when I hit the tab Customers in BO.

 

I think, there are some wrong settings in the ps_advice database tabel?

 

 

Best Regards,

Generaal

Edited by Generaal (see edit history)
Link to comment
Share on other sites

Hello Vekia,

 

I have found one of the errors in BO: 

Undefined index: id_ps_advice in /home/admin/domains/erotiekfabriek.be/public_html/modules/gamification/gamification.php on line 148

 

But these are from the module: 

Merchant Expertise (Last update).

 

But the prob for the APIs still going.

 

Best Regards,

Generaal

Link to comment
Share on other sites

  • 2 weeks later...

On the go...

The follow green line come up:

Warning: Invalid argument supplied for foreach() in /home/admin/domains/erotiekfabriek.be/public_html/classes/controller/AdminController.php on line 912

 

When I hit the "Save and configure" tab.

 

The code line 912 in the AdminController.php:

 

foreach ($this->fields_options as $category_data)

 

Also when I hit the tab: Save and Authenticate:

 

Cannot retrieve test results

 

Best Regards,

Generaal

Edited by Generaal (see edit history)
Link to comment
Share on other sites

  • 1 month later...

I'm getting the "Cannot retrieve test results" error as well. Could you shed some light on what tool you use to debug? If this information is in the developer's guide, please disregard my silly question, I'll get around to reading it shortly. Has anyone resolved this error?

Link to comment
Share on other sites

Same error for me on PrestaShop v 1.6.0.5 for Module - Google Analytics API v0.12.

 

Anyone have a solution?

 

Thanks in advance for the support!

 

Sincerely, Fabio Perri.

 

P.S. : Already reported as BUG by me in the forge of PrestaShop (http://www.forge.prestashop.com) with reference PSCSX-1470 .

Edited by Fabio Perri (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi there,

 

I think i have the same error on ps 1.5.6 (last version), after configuring client id, secret and profile, hit save and authenticate, redirects to google app page for accept the permissions, after granting redirects back to psBO with a green window "google api authorization granted" and a red one "Cannot retrieve test results".

Google analytics account stil does not work from yesterdays updates i think.

 

Any ideas?

 

Thanks

 

Edit :

The problem solved after updating google analytics platform from google

 

Hey how did you update the google analytics platform from Google? Have the same problem as you had! 

Link to comment
Share on other sites

  • 3 weeks later...

Hello folks,

I have spend my time with the Google Analytics APIs module, include in the prestashop upgrade, v.1.5.4.1

And have the follow prob:

 

 
Project Default Service Account
 
Deze app wil:
 
Offline toegang hebben
 
AccepterenAnnuleren

 

 

When I click on Accept, the follow error comes up:

 

Cannot retrieve test results

 

And in BO even: Notice: Undefined index: id_ps_advice in /home/admin/domains/erotiekfabriek.be/public_html/modules/gamification/gamification.php on line 148

 

Have someone any solution where I can find the solution?

 

Best Regards,

Generaal

 

I had the same error. My solution to set the allow_url_fopen = On; and re-Save the settings at the Google Api module.

It is working for me. 

Link to comment
Share on other sites

 

I had the same trouble. I solved:
1) google webmaster tools -> confirm ownership website with google analytics code
2) google apis -> API Access -> Notification Endpoints -> add your domain.

 

 

I am still receiving the "Cannot retrieve test results" message. I additionally associated my Webtools site to the Google Analytics site from the Webtools settings.

Edited by jordanbork (see edit history)
Link to comment
Share on other sites

Hi ,

 

I am getting lots of errors on PS1.6.0.6

1. Google is unreachable (check your firewall)

2. Google API Authorization granted but access token cannot be retrieved

3.Cannot retrieve test results.

 

It has nothing to do with my firewall.

 

Any ideas how to solve this?

/Alex

Link to comment
Share on other sites

A mi me funciono de esta manera.

En analitycs donde tienes que elegir el ID del perfil debeis tener mucho cuidado y elegir el id que corresponde,

yo tengo mas que una web y cada web tiene si ID.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

Hi there,

 

I think i have the same error on ps 1.5.6 (last version), after configuring client id, secret and profile, hit save and authenticate, redirects to google app page for accept the permissions, after granting redirects back to psBO with a green window "google api authorization granted" and a red one "Cannot retrieve test results".

Google analytics account stil does not work from yesterdays updates i think.

 

Any ideas?

 

Thanks

 

Edit :

The problem solved after updating google analytics platform from google

I have the same problem but it is not solved yet. What did you fill in "profile?" I have the newest universal google analytics account.

Link to comment
Share on other sites

Yes me too. No luck on getting it to work. Been waiting going on 72 hours but still says "Cannot retrieve test results" with in the Google module. (Pic attached). Shows some activity within my API's Request Overview page but NOTHING in my Google Analytics Overview page.

 

Any ideas?

 

Thanks in advance.

 

God Bless,

Q

post-436663-0-38831800-1410657421_thumb.jpg

Link to comment
Share on other sites

  • 1 month later...

Problem cannot retrieve test results solved by commenting one line and changing key in array for foreach in modules/gapi/gapi.php

//              if (isset($response['rows']) && is_array($response['rows']))         <-- comment this line
                        foreach ($response['columnHeaders'] as $row)                   <-- change rows to columnHeaders

 

I'm using Prestashop 1.6.9, GAPI not adapted for multistore option. Setting valid UA-xxxxxx code in another Google Analytics Module

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Google Analytics API v1.0.3 - by PrestaShop

1.6.0.9

 

Please be aware the Google Analytics API module will only work if you either:

  • have installed and configured the “Google Analytics” module
  • or have already embedded the Google Analytics script into your shop.

After SET:

v3.0 with OAuth 2.0: most powerful and up-to-date version

WHERE EMBED THE ANALYTICS CODE?

Edited by lse123 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Same problem "Cannot retrieve test results"

what i have done till this moment:

- embedded code by "normal" analytics plugin, UA code is visible in site code and in GoogleAnalytics

- Google API acces granted

2014-12-04_1437.png

- Analytics API status ON,

2014-12-04_1445.png

 

Any suggestions ?

Link to comment
Share on other sites

now i had the same problem ! 

this is the fix. look where he gets the profile ID !

 

http://youtu.be/SzWRRwKxhJI?t=4m30s

 

I saw your video and i have everyting same, but when you have to allow application i have only right "Povolit přístup offline" in EN (Enable offline access) you have other right.

Edited by NouF (see edit history)
Link to comment
Share on other sites

  • 3 months later...
  • 5 months later...
  • 2 months later...

"Cannot retrieve test results"

 

Do not fill in the UA- id in profile ID field under client secret, that was my mistake.
It should be another ID, this ID you can find in the url from your google analytics page, the one marked red (without the P)
https://www.google.com/analytics/web/?hl=nl&pli=1#report/visitors-overview/ab62536633w94595418p
972752622/
 

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
  • 7 months later...
  • 1 month later...
  • 8 months later...

Problem cannot retrieve test results solved by commenting one line and changing key in array for foreach in modules/gapi/gapi.php

//              if (isset($response['rows']) && is_array($response['rows']))         <-- comment this line

                        foreach ($response['columnHeaders'] as $row)                   <-- change rows to columnHeaders

 

I'm using Prestashop 1.6.9, GAPI not adapted for multistore option. Setting valid UA-xxxxxx code in another Google Analytics Module

Dont know where the problem is coming from!

It may have many reasons, so it may have many solutions!

 

But I have done everything right and still receiving the error "can't retrieve...."

 

Zhandos solution solve my error. made my day! :)

Edited by vvaahhiidd (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...