impressionlin Posted September 4, 2014 Share Posted September 4, 2014 Hello, I'm on 1.6.0.8 and I can't succeed to install Google analytics. I tried all solutions I read. Nothing is ok. I always have the same error : The redirect URI in the request: http://www.impressionlin.fr/modules/gapi/oauth2callback.php did not match a registered redirect URI Can somebody help me ? Thank you in advance. Link to comment Share on other sites More sharing options...
YaboL Posted September 4, 2014 Share Posted September 4, 2014 Hi, I had the same issue and I've solved in the following way: 1) I've created a new api project. 2) Go to APIs&auth-> Credentials and click on Create new client id (See img). 3) Application Type: Web Application and add the shop url with and without 'www' (See img) and save all. 4) Go to Consent Screen and insert your data (see img) and save. At this point go on your BO, insert your Client ID, Client Secret and profile number, save and done. Sorry for my english Thanks it worked Link to comment Share on other sites More sharing options...
impressionlin Posted September 4, 2014 Share Posted September 4, 2014 Hello, Thank you very much. I passed through error message. I get 2 new informations now and I don't really understand. On the google analytics module page I have : - in green : google API authorization granted - in red : cannot retrieve test results Did I miss something ? Link to comment Share on other sites More sharing options...
impressionlin Posted September 4, 2014 Share Posted September 4, 2014 And...your english is perfect !! and the print screens really helped me. Link to comment Share on other sites More sharing options...
Mister Denial Posted September 8, 2014 Share Posted September 8, 2014 Maybe you can try my solution, it's work with My Shop PS 1.6.0.9 and GOOGLE ANALYTICS API V3.0 In My Google Analytics Api Configuration ID Client : MyIdClient.apps.googleusercontent.com Client Secret : MyClientSecret Profile : XXXXXXXX --> 8 Digits in Google Analytics --> Admin --> Views Setting Screenshots: profile google analytics module.png Your screen shot made me realize that the whole time I had entered my profile ID starting with a "p" - I removed the "p" and now everything works! Silly mistake of mine! 2 Link to comment Share on other sites More sharing options...
Antakarana Posted September 8, 2014 Share Posted September 8, 2014 In my case no matter what I do... I always get: Error: redirect_uri_mismatch Prestashop 1.6.0.9 In My Google Analytics Api Configuration: ID Client : MyIdClient.apps.googleusercontent.comClient Secret : MyClientSecretProfile : XXXXXXXX --> 8 Digits in Google Analytics --> Admin --> Views Setting I fill the fields following the previous info... Link to comment Share on other sites More sharing options...
Mister Denial Posted September 8, 2014 Share Posted September 8, 2014 In my case no matter what I do... I always get: Error: redirect_uri_mismatch Prestashop 1.6.0.9 In My Google Analytics Api Configuration: ID Client : MyIdClient.apps.googleusercontent.com Client Secret : MyClientSecret Profile : XXXXXXXX --> 8 Digits in Google Analytics --> Admin --> Views Setting I fill the fields following the previous info... Have you tried setting up the URL in the API with our without https? And if your Prestashop is installed in a subfolder, you must make sure to include that in the URL too. Link to comment Share on other sites More sharing options...
Antakarana Posted September 8, 2014 Share Posted September 8, 2014 thanks for the answer but I already tried that... with and without www. with and without https... there is no subfolder.... Link to comment Share on other sites More sharing options...
ghostfr Posted September 8, 2014 Share Posted September 8, 2014 (edited) thats a new one!!! ?? whats wrong? Google API Authorization granted but access token cannot be retrieved and now this Google API Authorization granted ×Cannot retrieve test results tested some hours later and still Cannot retrieve test results Edited September 8, 2014 by ghostfr (see edit history) Link to comment Share on other sites More sharing options...
yasirdk Posted September 8, 2014 Share Posted September 8, 2014 I have the same problem about Cannot retrieve test results Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted September 9, 2014 Share Posted September 9, 2014 hi, don't forget to put Google Analyticscode to your store(or installed the plugin),and make sure google Analyitcs have already began to collect the data, Link to comment Share on other sites More sharing options...
bcolflesh Posted September 10, 2014 Share Posted September 10, 2014 This definitely works, but it requires everything to be done - folks with the errors are missing steps:https://console.developers.google.com - create Project> APIs>> add Analytics API (you can remove the other default ones that are "on"> Credentials>> Redirect URIs ex: http://www.yourstore.com/modules/gapi/oauth2callback.phphttps://www.yourstore.com/modules/gapi/oauth2callback.php https://yourstore.com/modules/gapi/oauth2callback.php https://yourstore.com/modules/gapi/oauth2callback.php >> JavaScript Origins ex: http://www.yourstore.com http://yourstore.com https://www.yourstore.com https://yourstore.com >> Consent Screen (important - will not work without this!) Fill out all non-optional information in the form and save. ---------------------------------- Prestashop Back Office Modules > - Filter by Installed & Not Installed and Enabled & Disbaled - search for google - Install Google Analytics 1.x by Prestashop and configure - add your user agent from Google Analytics website, ex : UA-1234567-1 - it's visible on the Home tab and several sub menus - check Universal box and hit save/updateModules > - now do the Google Analytics API module config with the previous data _______________________ You will always get an error about the data, as it takes a variable amount of time for it start pushing out via the API calls - all Google Analytics tie-ins are subject to this. You can make sure you are collecting data by going to the Google Analytics site and drilling down to Real Time > Overview, which will show live traffic to your site. Link to comment Share on other sites More sharing options...
ugokind Posted September 13, 2014 Share Posted September 13, 2014 obviously the problem is true. in the prestashop issue tracker there's not issues about that. but I'm absolutely sure the me and you did exactly the right operations. so I suggest you to analyze that row that get zero data: in gapi.php 227: $result_test = $this->api_3_0_requestReportData('', 'ga:visits,ga:uniquePageviews', date('Y-m-d', strtotime('-1 day')), date('Y-m-d', strtotime('-1 day')), null, null, 1, 1); let's start within it 1 Link to comment Share on other sites More sharing options...
labeleng Posted September 17, 2014 Share Posted September 17, 2014 I followed Tribal's advise and also changed my gapi folder permission to 0755, gapi.php to 0644. index.php to 0644 and oauth2callback.php to 0644 Link to comment Share on other sites More sharing options...
Vaupell Posted September 19, 2014 Share Posted September 19, 2014 (edited) hmm. Edited September 19, 2014 by Vaupell (see edit history) Link to comment Share on other sites More sharing options...
impressionlin Posted September 19, 2014 Share Posted September 19, 2014 Hello, My webmaster configured Google Analytics v1.8.2 - by PrestaShop module and uninstalled API Google Analytics v1.0.3 - by PrestaShop module. Everything is ok now. Thanks to all for your replies. Link to comment Share on other sites More sharing options...
ugokind Posted September 23, 2014 Share Posted September 23, 2014 not enough.. I had only one time a GAPI running.. it was in july. after that.. I reinstalled 8 times my web from scratch. It tools 2 months I did all of possible variations .. but I never have reached my goal. and using 1.8.2 older gapi.. gave any better results. i'm so sad.. in my DB with phpmyadmin I discovered that the gapi configuration is fine.. and I saw also the 2 Google secret keys (auth code and token) so I'm sure the grant is satisfied. but there's no way to retrieve data. bad code.. this GAPI. Link to comment Share on other sites More sharing options...
Maglev Posted September 25, 2014 Share Posted September 25, 2014 I cannot find my Google Analytics API module anymore. I used to have it and it was working fine but now it has disappeared and I cannot find a new one in either the Addons marketplace or when I search the web. I have the Google Analytics v1.8.2 module set up correctly with the proper user ID but I am at a loss as to where the Google Analytics API module has gone. Can anyone help me find the gapi module or send me a new one so I can use Google Analytics API on my site again. Link to comment Share on other sites More sharing options...
Giordx Posted September 25, 2014 Share Posted September 25, 2014 Hi jimmlawyer, try with the attachment. unfortunately it is in Italian ... gapi.zip Link to comment Share on other sites More sharing options...
ugokind Posted September 25, 2014 Share Posted September 25, 2014 (edited) thanks meanwhile these 2 days I tested an older version on google analytics module.. the 1.4.3 (found in another forum) and I can DECLARE that it run recent 1.8.x version not . now I'm trying your attachment but the folder NOTES with your file dwsync.xml is relevant?? ___ GREAT WORKS (only miss is in dashboard frontpage but statistics work) Edited September 25, 2014 by ugokind (see edit history) Link to comment Share on other sites More sharing options...
Maglev Posted September 25, 2014 Share Posted September 25, 2014 Thanks for sending the module Velit. It worked like a charm. Link to comment Share on other sites More sharing options...
ugokind Posted September 27, 2014 Share Posted September 27, 2014 hey.. don't stop .. we can go further.. I want to try to merge latest gapi release with the 102 release.. tomorrow I'll compare files.. and try to take the best of both. Link to comment Share on other sites More sharing options...
lovendo Posted October 2, 2014 Share Posted October 2, 2014 It worked for me setting the URL with and without 'www'. Thanks for sharing Link to comment Share on other sites More sharing options...
iFritz Posted October 8, 2014 Share Posted October 8, 2014 Question: Can i use the standard view(All website data) - created automatically - and use this ID as well? This view works for me at the analytics pages like charm. Or do i need this view to be conected with the Analytics API? Link to comment Share on other sites More sharing options...
durangodave Posted October 10, 2014 Share Posted October 10, 2014 can someone please put together a guide once you get this figured out so that many of us can set this up. i am a google noob lol... i mean i know how to set up a basic analytics account but when it come to all this oauth and special secrets and apps and redirects im a total noob. I did do that oauth2 and set it to yes, i also found my id and my profile number. But as far as the secret im totally lost. Can someone please do a simple guide... thanks Link to comment Share on other sites More sharing options...
sergio1991 Posted October 15, 2014 Share Posted October 15, 2014 You can find your profile ID in the address bar of your browser while accessing Analytics report. For the OLD VERSION analytics page the ID=xxxxxxxx is the following: https://www.google.com/analytics/reporting/?reset=1&id=XXXXXXXX&pdr=20110702-20110801 For the NEW VERSION analytic page it is the number at the end of the URL starting with p: https://www.google.com/analytics/web/#home/a11345062w43527078pXXXXXXXX/ Still the same error what now? Link to comment Share on other sites More sharing options...
IeM Posted October 29, 2014 Share Posted October 29, 2014 After authorising I'm getting "Google API Authorization granted but access token cannot be retrieved". Link to comment Share on other sites More sharing options...
dirsubmit Posted November 14, 2014 Share Posted November 14, 2014 Hi, What is the difference between between Google Analytics API add on and ganalytics add on ?? Can somebody please explain? Thanks! Link to comment Share on other sites More sharing options...
Mykhailo Posted November 21, 2014 Share Posted November 21, 2014 Hi guys! None of mentioned above solutions worked for me. Always getting Error: redirect_uri_mismatch PS v1.6.0.9 GAPI v1.0.3 Have somebody already reported this issue on Forge? Link to comment Share on other sites More sharing options...
Lyn&Or Bijoux Posted November 25, 2014 Share Posted November 25, 2014 Salut depuis -> https://console.developers.google.com -creer un nouveau projet -renseigner bien les zone content screen comme dit plus haut par Damien Metzger -Activer votre Api -Credential créer un nouveau client ID -Rensigner bien et attention dans le tuto les champ Authorized JavaScript origins et Authorized redirect URI sont inversé ! -Copier depuis le nouveau bloc créer le client ID et client SECRET -Copier les chiffre figurant dans l'URL qui succedent la lettre p= comme indiquer depuis le tutohttps://www.google.c...alytics/p=00000 ces chifre represente le Profil - On a donc bien nos 3 champs a remplir dans notre module API Google Analytics v3.0 PS :perso pour credential nouveau ID j'ai renseigner le champ Authorized redirect URI par http://your_domain_name.com/modules/gapi/oauth2callback.php mentionné plus haut par cinnamong. j'utilise cette solution à marché pour moi... http://your_domain_name.com/modules/gapi/oauth2callback.php dans redirect URI merci!!! Link to comment Share on other sites More sharing options...
Amit Ron Posted December 6, 2014 Share Posted December 6, 2014 403 Access denied. How I fix this error Link to comment Share on other sites More sharing options...
lucav87 Posted December 19, 2014 Share Posted December 19, 2014 (edited) add .php on google dev (my prestashop is setting with www.domain.it) http://www.**modules/gapi/oauth2callback.php https://www.**/modules/gapi/oauth2callback.php and it work sorry for my bad english Edited December 19, 2014 by lucav87 (see edit history) Link to comment Share on other sites More sharing options...
Linda CLARINI Posted December 26, 2014 Share Posted December 26, 2014 Thanks Tribal! I have tried and I have the following message: Google API Authorization granted Cannot retrieve test results Do you have the same? Hello, I'm french so sorry for my english but I've the same message. Link to comment Share on other sites More sharing options...
jonysi_d Posted December 30, 2014 Share Posted December 30, 2014 (edited) Hi, I had the same issue and I've solved in the following way: 1) I've created a new api project. 2) Go to APIs&auth-> Credentials and click on Create new client id (See img). 3) Application Type: Web Application and add the shop url with and without 'www' (See img) and save all. 4) Go to Consent Screen and insert your data (see img) and save. At this point go on your BO, insert your Client ID, Client Secret and profile number, save and done. Sorry for my english I have configure like this, buy doesn't work for me, i have PS 1.6.0.9. Google API Authorization granted ×Cannot retrieve test results have one question: to work, ait must be my site on url_fopen ??? because my site is Sharing the side and told me that being shared server can not have url_fopen. is it the usual ?? and can be this the reasin ?? thanks and excuseme for my english Edited December 30, 2014 by jonysi_d (see edit history) Link to comment Share on other sites More sharing options...
Rescue Posted December 31, 2014 Share Posted December 31, 2014 It really doesn't seem like this should be this difficult. I'm new to Prestashop but not new to Google analytics or shopping carts. I have now spent several hours (more out of stuborness) to figure this out. I would vote that the Presta Shop team needs to either figure out a better alternative or give more in dept instructions. Link to comment Share on other sites More sharing options...
VItor Hugo Posted January 1, 2015 Share Posted January 1, 2015 Sugestão de vídeo para configuração do API do Google Analytics !!! https://www.youtube....h?v=SzWRRwKxhJI Atenção ao final para liberação da "Tela de consentimento" 1 Link to comment Share on other sites More sharing options...
jonysi_d Posted January 2, 2015 Share Posted January 2, 2015 I think the problem is that I have to have url_fopen = on in my hosting server and the hosting would not active for safety reasons. Link to comment Share on other sites More sharing options...
Linda CLARINI Posted January 4, 2015 Share Posted January 4, 2015 I have configure like this, buy doesn't work for me, i have PS 1.6.0.9. Google API Authorization granted ×Cannot retrieve test results have one question: to work, ait must be my site on url_fopen ??? because my site is Sharing the side and told me that being shared server can not have url_fopen. is it the usual ?? and can be this the reasin ?? thanks and excuseme for my english Je te réponds en françaisj'espère que c'est bien ta langue d'origine. Quand tu vas dans "Go to APIs&auth", fais attention à l'adresse du site, si c'est http://monsite.com... et que tu vois http://www.monsite.com... enlève le www. Si ça peut aider, c'est comme ça que j'ai finalement obtenu le feu vert de ganalytics, d'ailleurs quand cela fonctionne, tu arrives direct sur une page de "Félicitations" qui dit en gros que tu as bien tout configuré. Il reste toujours un problème entre paypal, ganalytics et prestashop parce que je ne vois pas mes ventes dans Prestashop ni dans l'E-commerce de ganalytics mais bon ... D'ailleurs si quelqu'un à une solution je suis preneuse voici la référence du bug dans la forge : http://forge.prestashop.com/browse/PNM-3142 Linda. Link to comment Share on other sites More sharing options...
jonysi_d Posted January 5, 2015 Share Posted January 5, 2015 (edited) Thanks fou your answer Linda... but I have the www. on my Prestashop and on the api I have the same. Loock my configuration: Edited January 5, 2015 by jonysi_d (see edit history) Link to comment Share on other sites More sharing options...
jonysi_d Posted January 5, 2015 Share Posted January 5, 2015 (edited) I have a doubt because in the prestashop modul API configuration, tell the url to put on the URI, in my case is: http://www.myweb.com/modules/gapi/oauth2callback.php but in the GOOGLE APIS configurations, tell : no relative path but the http://www.myweb.com/modules/gapi/oauth2callback.php but i'ts a path .... isn't ??? Edited January 5, 2015 by jonysi_d (see edit history) Link to comment Share on other sites More sharing options...
Linda CLARINI Posted January 6, 2015 Share Posted January 6, 2015 (edited) I have a doubt because in the prestashop modul API configuration, tell the url to put on the URI, in my case is: http://www.myweb.com/modules/gapi/oauth2callback.php but in the GOOGLE APIS configurations, tell : no relative path but the http://www.myweb.com/modules/gapi/oauth2callback.php but i'ts a path .... isn't ??? Hello Jonysi_d, I'll try to answer in english but remember that's it's not my usual language. My english is not good so I'm not very clear, you are right if you have www. you should write www. it's what I'll try to tell you but my explication was too complicated, sorry. So for that, it's ok. I think you have already check my solutions but who know ? There is a lot of indication and at the end we are lost, no? 1a-You can go in App Google analytics/Admin in the "Paramètres de la vue/View parameters" the url of your site web : URL of web site Check again for your "http://www." 1b- It's not for you but for the others beginners who have perhaps an url adress like me http://mywebsite.org"" or http://www.mywebsite.com" or "https://wwwmywebsite.com." or "http://mywebsite.com" ... you must write exactly YOUR website's url 2a--You can also check that in API Google analytics on Prestashop at "ID client" you have to take the first line who is finish by : ID Client ...apps.googleusercontent.com 2b-For "Secret client" you have to take the third line. 2c--In the "Google Analytics Tracking ID" of Google analytics AND in "Profil" of API Google analytics have you check that you have the same numbers ? It's the numbers that you can find after the "P" in the url adress of your app Google analyttics like that : https://www.google.com/analytics/web/?authuser=...2389p945....6... I hope you will understand what I try to say and you will succeed (let us know), Linda. Edited January 6, 2015 by Linda CLARINI (see edit history) 1 Link to comment Share on other sites More sharing options...
bcolflesh Posted January 8, 2015 Share Posted January 8, 2015 Note: everything is working for me now after updating to 1.6.0.11 this morning - thanks PrestaShop! Link to comment Share on other sites More sharing options...
jonysi_d Posted January 9, 2015 Share Posted January 9, 2015 hi Linda... Hello Jonysi_d, I'll try to answer in english but remember that's it's not my usual language. My english is not good so I'm not very clear, you are right if you have www. you should write www. it's what I'll try to tell you but my explication was too complicated, sorry. So for that, it's ok. I think you have already check my solutions but who know ? There is a lot of indication and at the end we are lost, no? 1a-You can go in App Google analytics/Admin in the "Paramètres de la vue/View parameters" the url of your site web : URL of web site Check again for your "http://www." 1b- It's not for you but for the others beginners who have perhaps an url adress like me http://mywebsite.org"" or http://www.mywebsite.com" or "https://wwwmywebsite.com." or "http://mywebsite.com" ... you must write exactly YOUR website's url 2a--You can also check that in API Google analytics on Prestashop at "ID client" you have to take the first line who is finish by : ID Client ...apps.googleusercontent.com 2b-For "Secret client" you have to take the third line. 2c--In the "Google Analytics Tracking ID" of Google analytics AND in "Profil" of API Google analytics have you check that you have the same numbers ? It's the numbers that you can find after the "P" in the url adress of your app Google analyttics like that : https://www.google.com/analytics/web/?authuser=...2389p945....6... I hope you will understand what I try to say and you will succeed (let us know), Linda. excume, I don't undertand the 2c ( where can I check my profil API ( same number of google analytics ) ??? ohh... you english is better than mine..!!! :-) Link to comment Share on other sites More sharing options...
Linda CLARINI Posted January 11, 2015 Share Posted January 11, 2015 (edited) hi Linda... excume, I don't undertand the 2c ( where can I check my profil API ( same number of google analytics ) ??? ohh... you english is better than mine..!!! :-) Hi Jonysi, Sorry I can't answer you before : I've a problem with Ganalytics (hahaha Google analytics is really a joker no?) it's not working anymore ... I think it's good idea like "Bcolflesh" to install the last version of Prestashop 1.6.0.11. For the 2c : In API Google Analytics, click on v1.3 and you can read in your language how find your profil. It's numbers after "p" when you are going in Google Analytics on the web, you see? I copy in french. After you return on V3.0 and you write the settings. I think you use the last version (2) if not read the indications for the (1) old version. "Quelle version de l'API Google Analytics voulez-vous utiliser? v1.3 : facile à configurer mais dépréciée et moins sécurisée v3.0 : avec OAuth 2.0, la plus puissante et la plus récente Vous trouverez l'identifiant de profil ("Profile ID") dans la barre d'adresse de votre navigateur lorsque vous consultez le rapport sur le site de Google Analytics. (1) Pour l'ANCIENNE version de Google Analytics, l'ID du profil est dans le paramètre "id" de l'URL (voir "&id=xxxxxxxx") : https://www.google.com/analytics/reporting/?reset=1&id=XXXXXXXX&pdr=20110702-20110801 (2) Pour la NOUVELLE VERSION de Google Analytics, l'ID du profile est le numéro situé à la fin de l'adresse, commençant par un p : https://www.google.com/analytics/web/#home/a11345062w43527078pXXXXXXXX/" So I going to try to updated Prestashop and will see. Tell me if it's ok for you. Best regards, Linda. Edited January 11, 2015 by Linda CLARINI (see edit history) Link to comment Share on other sites More sharing options...
jonysi_d Posted January 11, 2015 Share Posted January 11, 2015 Ahhh..ok.. it's clear for me. It doesn't work..!! I'll try to investigate... thanks for your time Link to comment Share on other sites More sharing options...
TusPerfumesOnline Posted January 20, 2015 Share Posted January 20, 2015 (edited) Yo estoy igual que algunos anteriores. Tengo mi cuenta de API creada desde hace meses, también Analytics. Ha estado funcionando un tiempo, pero dejo de monitorizar hace unos días. He leído el foro, y no veo que estoy haciendo mal. El módulo es Google Analytics API v1.0.3. Tengo incluida en la Analytics API la información de Client ID, Client Secret. Tambien tengo incuido el ID Vista de Analytics 9xxxxxxx. He probado a regenerar la clave secreta de la API, pero siempre me muestra el mensaje siguiente: Error: redirect_uri_mismatch Application: Tus Perfumes Online You can email the developer of this application at:[email protected] The redirect URI in the request: http://www.tusperfumesonline.com/modules/gapi/oauth2callback.php did not match a registered redirect URI. Ya no se que probar. También he intentado incluir el codigo ID Seguimiento (UA-xxxxxxxx-1) en el módulo Google Analytics v2.0.5, pero tampoco me muestra nada en tiempo real, por ejemplo, ni en el contador de visitas. Edited January 20, 2015 by LoloMendez (see edit history) Link to comment Share on other sites More sharing options...
teodoro Posted February 2, 2015 Share Posted February 2, 2015 I am having trouble setting this up. I have the Client ID and Client Secret but I am not sure what to put in the Profile field. Please help. Error: redirect_uri_mismatch The redirect URI in the request: http://www.simplcig.com/Simpl/modules/gapi/oauth2callback.php did not match a registered redirect URI I solved that problem by logging out from all my Google Account, and then login with the only one interested in this procedure. Link to comment Share on other sites More sharing options...
Recommended Posts