Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS console errors #2

Closed
chrxr opened this issue Feb 25, 2016 · 5 comments
Closed

JS console errors #2

chrxr opened this issue Feb 25, 2016 · 5 comments

Comments

@chrxr
Copy link

chrxr commented Feb 25, 2016

Hi @tomdyson,

I've got to the point where everything is installed, but I'm afraid I'm getting a whole load of JS console errors. A screenshot of the console is attached. I'm getting these errors both locally and on production.

It's mostly 403s... Something to do with insufficient permissions? Pretty sure I have my service account setup correctly and added to my GA account

screen shot 2016-02-25 at 13 18 46

@tomdyson
Copy link
Owner

It looks like permission issues on your account. Are you sure you've got the correct site ID? If you view source for that page, do you see a value for 'access_token'?

@chrxr
Copy link
Author

chrxr commented Feb 25, 2016

Yes, there is a value in access_token.

{"error":{"errors":[{"domain":"usageLimits","reason":"accessNotConfigured","message":"Access Not Configured. The API (Google Analytics API) is not enabled for your project. Please use the Google Developers Console to update your configuration.","extendedHelp":"https://console.developers.google.com"}],"code":403,"message":"Access Not Configured. The API (Google Analytics API) is not enabled for your project. Please use the Google Developers Console to update your configuration."}}

So, the API wasn't enabled for the project/service account created. I've enabled the API and now everything is great!

Once you create the project & service account, you need to go to the interface below to activate the API for the particular project:

https://console.developers.google.com/apis/api/analytics/overview

That's not mentioned in the setup pages you've linked to, so probably worth including in the readme. But anyway, all is well now for me! Thanks!

@coredumperror
Copy link

I ran into this same problem. Because I created a new Project as part of the steps to generate a Service Account, that project didn't have the Analytics API enabled (even though I had enabled it in my previous Projects, which is why I was so confused about it being disabled).

I second the suggestion that this advice should be added to the setup instructions.

@mwcbrent
Copy link

One note that caught me up on this is to not use the number starting with UA- but rather the "View ID" under property > account > view > settings in Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants