简体   繁体   中英

How to get a list of views (profiles) in Google Analytics Data API (GA4)?

Help Needed -

In Google v3 we have API URL https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles

but how to get list of views (profiles) using Google Analytics Data API (GA4)?

Thanks in advance.

You appear to be using the Google analytics management api account summaries list method. THis method and all of the management api is designed to work with Universal analytics it does not support GA4 in any way.

What you should be looking at is the Google Analytics Admin API accounts.list method.

Remember that at the time of writing this api is in Alpha and can have breaking changes in the future. Also check out the Google cloud client libray

If you need any help with code let me know I have some i have been testing with but being that the library is in alpha im not sure its a good idea to put it here as its going to change in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM