【发布时间】:2014-08-22 21:43:19
【问题描述】:
这就是我从任何 Google Analytics(分析)帐户打印域的方式。如何代替(或使用域)打印配置文件 ID?
global $_params, $output_title, $output_body;
$output_title = 'Adwords';
$output_nav = '<li><a href="'.$scriptUri.'?logout">Logout</a></li>'."\n";
$output_body = '<h1>Google Adwords Access demo</h1>
<p>The following domains are in your Google Adwords account</p><ul>';
$props = $service->management_webproperties->listManagementWebproperties("~all");
foreach($props['items'] as $item) {
$output_body .= sprintf('<li>%1$s</li>', $item['name']);
}
$output_body .= '</ul>';
这一行是获取域的函数:
$props = $service->management_webproperties->listManagementWebproperties("~all");
我现在需要一些东西来获取多个域的配置文件 ID。
提前致谢。
【问题讨论】:
标签: api google-analytics google-analytics-api