Getting a link to a specific Google Analytics view

后端 未结 3 1234
-上瘾入骨i
-上瘾入骨i 2021-01-06 16:10

I have a GA account, with defined properties and views. Now, I gave viewing rights for a few users to a specific view. How can I construct/get programmatically a direct URL

3条回答
  •  情话喂你
    2021-01-06 16:57

    I have a few points to add to Matt and Adam's answers:

    • I chose to build a generic URL for the main view instead of a report. That way a user can navigate to a report of their choosing. The URL structure is https://analytics.google.com/analytics/web/#/report-home/a[account id]w[internal web property id]p[view id] Important: a user has to have at least READ_AND_ANALYZE permissions for the web property in order to access its default view.
    • internalWebPropertyId is a resource in the web properties collection and can be obtained through various GA Management API calls. For example, I extracted this value from the response object after creating a new web property using insert call.

提交回复
热议问题