Comments (17)
I just tested and it works.
If you just created the account you may need to wait a little.
from analytics-l4.
Ok i'll give it sometime
from analytics-l4.
@mrfoh Did you ever resolve this issue?
I've set up the config with my OAuth credentials and set up the .p12 certificate path.
Then I put the service email as a user on my Analytics console with the ability to Read & Analyse.
However, when I try something such as:
Route::get('test', function() {
echo "<pre>";
print_r(Analytics::getAllSitesIds());
});
I get "This webpage is not available" in Chrome, and "The connection was reset" in Firefox. However, I only get this when I'm working on localhost. I tried it fresh on my staging server and everything worked fine. I tried from scratch on localhost to make sure I hadn't made a mistake along the way but I still get the same issue.
How can I get it to work on localhost?
from analytics-l4.
Never got around to figuring it out. Decided to use the google analytics site instead.
Best regards
Patrick Foh
On May 18, 2014, at 2:42 PM, Sacha Corazzi [email protected] wrote:
@mrfoh Did you ever resolve this issue?
I've set up the config with my OAuth credentials and set up the .p12 certificate path.
Then I put the service email as a user on my Analytics console with the ability to Read & Analyse.However, when I try something such as:
Route::get('test', function() {
echo "<pre>"; print_r(Analytics::getAllSitesIds());
});
I get "This webpage is not available" in Chrome, and "The connection was reset" in Firefox. However, I only get this when I'm working on localhost. I tried it fresh on my staging server and everything worked fine. I tried from scratch on localhost to make sure I hadn't made a mistake along the way but I still get the same issue.How can I get it to work on localhost?
—
Reply to this email directly or view it on GitHub.
from analytics-l4.
@Sachiano Just tested your code on localhost and it works.
Did you modify the config and put your certificate here ? \app\config\packages\thujohn\analytics
from analytics-l4.
Yep, that's where I put the certificate.
Here's my config file:
<?php
return array(
'client_id' => 'xxx.apps.googleusercontent.com',
'service_email' => '[email protected]',
'certificate_path' => __DIR__ . '/certificate.p12',
'use_objects' => true,
);
Obviously "xxx" is my actual client id/service email.
I know the certificate is being picked up because if I change the name in the config file to a false file, the certificate not found exception is thrown.
from analytics-l4.
Maybe the problem comes from your key.
Did you check it in the google console ?
In "Public API access" you have "Referers"
from analytics-l4.
@thujohn Here's my API Credentials page
I generated a Public API access key and put in local IPs... but I'm not using that key anywhere?
from analytics-l4.
Can you try to create a new key ?
Type : Browser key
Referers : leave empty
from analytics-l4.
API key xxxxxxxxxxxxxxx
Referers Any referer allowed
Activation date May 21, 2014 2:17 PM
Activated by [email protected] (you)
It still hasn't worked. Is there anywhere I should be putting that API key?
from analytics-l4.
I'm sorry but I don't know...
from analytics-l4.
If you can send me your infos/certificate I will test on my local config
from analytics-l4.
Haha me either! I will send you the info, thanks.
from analytics-l4.
I'm Facing The Same Problem ...Can Any One Help Me
from analytics-l4.
me too facing same issure.plz anyone help to resolve this..im working in local.
from analytics-l4.
I have the same problem. Config file is correct but simple requests like:
echo Analytics::getSiteIdByUrl('http://github.com/');
generate "This webpage is not available" error in Chrome browser. I'm working on localhost xampp + vhost.
Any suggestions?
EDIT:
I think I found an answer on stackoverflow: post
It seems that, despite ambiguous documentation, most Google APIs do not support service accounts yet, including Google Analytics. They cannot digest OAuth2 tokens returned by a .p12 signed JWT request. So, as of right now, you cannot use Google Analytics API V3 with a service account.
When I check this solution (using CURL) on my example i will tell you does it works.
from analytics-l4.
Bump. I got exactly same issue as user one post before me.
Edit: Do not do it locally :) I uploaded everything to dev server (accessible form the internet) and it works perfectly.
from analytics-l4.
Related Issues (20)
- User does not have any Google Analytics account. HOT 9
- Your requirements could not be resolved to an installable set of packages. HOT 8
- Counting visit through analytics-l4 always zero HOT 3
- Non-static method HOT 6
- Is there any way to authenticate other than using Service Account? HOT 3
- Adding filters to the query HOT 4
- Specify client id, service email and certificate
- Class 'Class' not found
- 403 error HOT 1
- Support for Web Sever access ? HOT 5
- Google AdWords HOT 1
- Install/update issue requiring google/apiclient 1.1.* HOT 6
- ErrorException file exists
- Laravel 5 support HOT 13
- who Transferring chart ?
- When will Laravel 5 support ? HOT 1
- ErrorException (E_UNKNOWN) fread(): Length parameter must be greater than 0 HOT 1
- Cache issue on shared hosting
- optParams not working
- RuntimeException error on update HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics-l4.