Question

I can get profile ids with Management API but it's a bit complicated. Is there any easy to get all my profile ids?

Thanks,

Était-ce utile?

La solution

Are you aware that you can pass the string ~all for the accountId and webPropertyID parameters when listing profiles using the Management API? So all you need to get a list of all profiles is:

HTTP

GET https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles

Java

Profiles profiles = analytics.management.profiles.list("~all", "~all").execute();

Reading the ids from the returned profiles is also trivial.

How can you expect there to be an easier way?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top