Open GoogleCodeExporter opened 9 years ago
Im encountering the same problem. Im using windows xp php 5.2.6
I removed the actual email and password. Thanks
Code is:
<?php
define('ga_email','xxx@gmail.com');
define('ga_password','xxx');
define('ga_profile_id','xxx');
require 'gapi.class.php';
$ga = new gapi(ga_email,ga_password);
$ga->requestReportData(ga_profile_id,array('browser','browserVersion'),array('pa
geviews','visits'));
?>
<table>
<tr>
<th>Browser & Browser Version</th>
<th>Pageviews</th>
<th>Visits</th>
</tr>
<?php
foreach($ga->getResults() as $result):
?>
<tr>
<td><?php echo $result ?></td>
<td><?php echo $result->getPageviews() ?></td>
<td><?php echo $result->getVisits() ?></td>
</tr>
<?php
endforeach
?>
</table>
<table>
<tr>
<th>Total Results</th>
<td><?php echo $ga->getTotalResults() ?></td>
</tr>
<tr>
<th>Total Pageviews</th>
<td><?php echo $ga->getPageviews() ?>
</tr>
<tr>
<th>Total Visits</th>
<td><?php echo $ga->getVisits() ?></td>
</tr>
<tr>
<th>Results Updated</th>
<td><?php echo $ga->getUpdated() ?></td>
</tr>
</table>
Original comment by thumbint...@gmail.com
on 8 Sep 2009 at 11:01
Same here. Did Google change anything that broke compatibility with GAPI 1.3?
Original comment by projektz...@googlemail.com
on 19 Sep 2009 at 11:31
Had the same problem, my account ID was wrong. I got the right one with the
sample
code "example.account.php" and now it works!
Original comment by antti...@gmail.com
on 15 Oct 2009 at 10:07
Thanks very much to commenter #3. Worked perfectly!! Much appreciated.
Original comment by samala...@gmail.com
on 24 Apr 2011 at 3:41
comment 3 did not help me out. Google passes back the Request token but gapi
seems to have problems using it.
I even tried stripping out the 1/ at the start of the token... still same
results.
If I cant use a request token provided by google to turn around and request a
access token to store into database then I can't use use :(
Note: the user was directed to google with this
-------------
https://www.google.com/accounts/AuthSubRequest?next=<?=$type?>://<?=$_SERVER["HT
TP_HOST"]?>
/?scope=https://www.google.com/analytics/feeds/&secure=0&session=1
-------------
-code-
$ga = new gapi(null,null,'1/-WcoNQJc7EJ702f56Jb4t0TV0lW89po1Zy0AdkyS0PY');
-Result-
Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed to
request account data. Error: " Token invalid Token invalid Error 401 "' in
Original comment by Tony.Fre...@gmail.com
on 25 Apr 2011 at 9:15
I got the same problem now, when i was pushed by google to migrate my adwords
account to a different one due to conflict with my google apps account.
Sollution was to go to https://www.google.com/accounts/DisplayUnlockCaptcha and
unlock the new email using captcha
Original comment by kap...@mediacentrum.cz
on 27 Apr 2011 at 8:16
But in this code ....Can i display the chart (view visitors) ??
Original comment by barotvis...@gmail.com
on 7 Oct 2011 at 1:13
[deleted comment]
[deleted comment]
Are the developers of the script aware of that MAIN issue/securityrisk this
error shows both email-address and password fully visible for the visitor if
user of the script use 2-step verification and haven't changed GAPI to use the
"script-specific" password??
With a Google-search of this error shows tons of theese emails fully visible,
ready to to be hacked
Original comment by nordicwe...@gmail.com
on 4 Dec 2011 at 8:16
Please help me, i've got same problem. Please help me know what is
ga_profile_id?
Is it Property ID: UA-1145xxx-16 ?
Original comment by quangtam...@gmail.com
on 14 Jun 2012 at 5:25
for anybody still using GAPI - I've found what was causing this in my case. You
need to update The OpenSearch namespace - read here at the bottom:
https://developers.google.com/gdata/docs/developers-guide
it's in 2 places in gapi - just replace http://a9.com/-/spec/opensearchrss/1.0/
with http://a9.com/-/spec/opensearch/1.1/
hope this helps - took me an hour to find that....
Original comment by slawek.n...@gmail.com
on 25 Jul 2012 at 8:48
Need help!! :( Same error, no fixing TRIED ALL!!
Original comment by ad...@fedevarer.dk
on 27 Aug 2012 at 8:45
Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed to
authenticate user. Error: ""' in /var/www/tools/gapi.class.php:421 Stack trace:
#0 /var/tools/gapi.class.php(65): gapi->authenticateUser('abc@gmail...',
'@abc123@') #1 /var/tools/transaction_report.php(37):
gapi->__construct('abc@gmail...', '@abc123@') #2 {main} thrown in
/var/tools/gapi.class.php on line 421
Original comment by kapilver...@gmail.com
on 28 Nov 2014 at 11:10
Same error here maybe no body developing gapi anymore?
Original comment by webdes...@pranczek.hu
on 21 Mar 2015 at 7:54
I'm also getting the same error .Please help me I tried replacing
http://a9.com/-/spec/opensearchrss/1.0/ with
http://a9.com/-/spec/opensearch/1.1/ .But still same error is coming .
Original comment by jasmeetj...@gmail.com
on 25 Mar 2015 at 6:25
Original issue reported on code.google.com by
dimpeede...@gmail.com
on 22 Aug 2009 at 2:09