سؤال

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,

هل كانت مفيدة؟

المحلول

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?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top