Reputation: 13
After https://analytics.google.com was updated to v4 there are no more views (profile ids). A user which registered after the update needs to set webDataStream properties in order to create and view a Report.
I can get those new properties from analytics admin api (https://developers.google.com/analytics/devguides/config/admin/v1) however i do not know how to use these properties with the analytics reporting v4 api. The analytics reporting v4 api requires the view (profile id).
I searched after some guides in https://developers.google.com but i cant find anything related to this topic after they updated analytics to v4.
You can also try this out by using the google analytics api explorer https://developers.google.com/apis-explorer and oauth playground https://developers.google.com/oauthplayground/ .
If anyone knows more Information about this, please feel free to share the knowledge. Thanks for your support and i hope that you guys will also be able to make some use out of this.
Upvotes: 1
Views: 147
Reputation: 584
Marius,
The Core Reporting API V4 does not support GA4 properties, and can only be used to query Universal Analytics properties. In order to access data in the new GA4 properties, please use the Google Analytics Data API V1 (currently in preview).
Upvotes: 1
Reputation: 34978
If you problem is, that you still want to access the data via old APIs on new GA accounts, there seems to be the option to still create a Universal Analytics account when creating the new property (extended options).
You can also create both (GA4 and UA) the same time.
Found it here: https://github.com/spatie/laravel-analytics/issues/371
Upvotes: 0