在谷歌分析中,什么是'ga:accountName'?
它可能看起来像一个简单的问题,但我找不到任何文件告诉我什么ga:accountName应该返回。
如果我从java示例运行google的代码:
private static void getAccountFeed(AnalyticsService analyticsService)
throws IOException, MalformedURLException, ServiceException {
// Construct query from a string.
URL queryUrl = new URL(
"https://www.google.com/analytics/feeds/accounts/default?max-results=10");
// Make request to the API.
AccountFeed accountFeed = analyticsService.getFeed(queryUrl, AccountFeed.class);
// Output the data to the screen.
System.out.println("-------- Account Feed Results --------");
for (AccountEntry entry : accountFeed.getEntries()) {
System.out.println(
"\nAccount Name = " + entry.getProperty("ga:accountName") +
"\nProfile Name = " + entry.getTitle().getPlainText() +
"\nProfile Id = " + entry.getProperty("ga:profileId") +
"\nTable Id = " + entry.getTableId().getValue());
}
// Construct query from a string.
URL queryUrl = new URL(
"https://www.google.com/analytics/feeds/accounts/default?max-results=10");
// Make request to the API.
AccountFeed accountFeed = analyticsService.getFeed(queryUrl, AccountFeed.class);
// Output the data to the screen.
System.out.println("-------- Account Feed Results --------");
for (AccountEntry entry : accountFeed.getEntries()) {
System.out.println(
"\nAccount Name = " + entry.getProperty("ga:accountName") +
"\nProfile Name = " + entry.getTitle().getPlainText() +
"\nProfile Id = " + entry.getProperty("ga:profileId") +
"\nTable Id = " + entry.getTableId().getValue());
}
它会返回我的网站。
任何人都可以帮忙吗? 感谢
答案 0 :(得分:0)
在此页面this page中 - GA个人资料被分组到与UA代码的第一部分相对应的帐户中(如果您只能访问一个您从未真正看到它的GA帐户,但是如果您的Google ID与多个GA帐户相关联,然后您可以选择自己的帐户中间页,然后才能选择要报告的个人资料。
- dxp:property name = ga:webPropertyId-The 与之关联的网络媒体资源ID 轮廓。
- DXP:属性 name = ga:accountName - 的名称 与个人资料相关联的帐户。
- dxp:property name = ga:accountId-The 与之关联的帐户ID 个人资料,用于跟踪代码 您的网络媒体资源(例如UA- 30481 -22)。
(从上面的链接无耻地剪切和粘贴)
答案 1 :(得分:0)
'ga:accountName'是Google分析帐户名称。如果您在Google中拥有Google Analytics帐户。转到google anlytics它会显示accountName以及id,PropertyName以及id,个人资料名称以及id。个人资料ID需要获取Gadata