Google Analytics API Create New Property

2019-02-23 08:24发布

问题:

The issue I'm having is when I try and insert a new web property using the Google Analytics Api I'm getting the error: "reason": "insufficientPermissions", "message": "Your project does not have access to this feature."

This is even when I use the page: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/webproperties/insert

Has anyone being able to successfully create a new web property and return its tracking code?

回答1:

Write operations are still in beta. Before you can access this feature you need to request access to the beta.

Write operations in the Management API (e.g. create, update, delete, patch) for Web Property, View (Profile), and Goal resources is currently available as a developer preview in limited beta. If you're interested in using these features, request access to the beta.

Apply for the beta, you probably wont hear back from them but wait 24 hours and give it a try it normally works then.