简体   繁体   English

需要有关Analytics API的帮助-网络媒体资源名称和帐户名称(在.Net中)

[英]Need help on Analytics API - Web Property Name and Account Name (in .Net)

I am downloading Analytics data using the Google Analytics Dot.Net libraries. 我正在使用Google Analytics(分析)Dot.Net库下载Analytics(分析)数据。 I am able to get the report data using the AnalyticsService object. 我可以使用AnalyticsService对象获取报告数据。 It returns Google.Apis.Analytics.v3.Data.GaData. 它返回Google.Apis.Analytics.v3.Data.GaData。 My query consists of dimensions, metrics and profileid (View Id). 我的查询由维度,指标和profileid(查看ID)组成。

I need to know the Account Name and Web Property name, unfortunately returned GaData has webPropertyId and accountid, but not the names. 我需要知道帐户名称和网络媒体资源名称,很遗憾返回的GaData具有webPropertyId和accountid,但没有名称。 How do I get the name? 我怎么得到名字?

I tried - 我试过了 -

GaData response = analyticsservice.Execute();
var webproperty = service.Management.Webproperties.Get(response.ProfileInfo.AccountId,response.ProfileInfo.WebPropertyId);

but this returned webproperty doesn't have name. 但这返回的webproperty没有名称。

我不确定.net,但是对于其他库,您可以使用Management API来检索帐户名等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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