AdWords链接创建期间出现Google Analytics API 500内部错误 [英] Google Analytics API 500 internal error during AdWords link creation

查看:139
本文介绍了AdWords链接创建期间出现Google Analytics API 500内部错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误:


code:500,message:There was an internal error。


每次尝试通过Analytics Management API将Google分析结果与AdWords关联时都是例外。



代码非常简单(PHP),就像文档示例一样:

  $ adwordsAccounts = []; 
$ b foreach($ adwordsAccountIds as $ customerId){
$ adwordsAccount = new \Google_Service_Analytics_AdWordsAccount();
$ adwordsAccount-> setCustomerId($ customerId);
$ adwordsAccount-> setAutoTaggingEnabled(true);
$ adwordsAccounts [] = $ adwordsAccount;
}

$ adWordsLink = new \Google_Service_Analytics_EntityAdWordsLink();
$ adWordsLink-> setName('AdWords Link');
$ adWordsLink-> setAdWordsAccounts($ adwordsAccounts);

$ response = $ client-> management_webPropertyAdWordsLinks-> insert($ accountId,$ webPropertyId,$ adWordsLink);

google-api-php-client库版本是最新版本(2.2.0)

解决方案

From 账户管理


在Management API中编写操作(例如创建,更新,删除,$对于Web Property,View(Profile)和Goal资源,b $ b补丁是
,目前可作为开发者预览版在有限测试版中提供。如果您对使用这些功能感兴趣,请求访问该测试版。


除非我误认为您没有申请访问测试计划。请注意,如果您获得了访问权限,您可能需要长达一个月的时间才能获得Google的声明。



目前看来有一个bug,可以找到bug日志此处。 Google已收到通知,我们将不得不等待他们解决。

I'm getting Error :

"code":500,"message":"There was an internal error."

exception every time I'm trying to link Google analytics to Adwords via Analytics Management API.

Code is pretty straightforward (PHP), just like documentation example:

$adwordsAccounts = [];

foreach ($adwordsAccountIds as $customerId) {  
    $adwordsAccount = new \Google_Service_Analytics_AdWordsAccount();
    $adwordsAccount->setCustomerId($customerId);
    $adwordsAccount->setAutoTaggingEnabled(true);
    $adwordsAccounts[] = $adwordsAccount;
}

$adWordsLink = new \Google_Service_Analytics_EntityAdWordsLink();
$adWordsLink->setName('AdWords Link');
$adWordsLink->setAdWordsAccounts($adwordsAccounts);

$response = $client->management_webPropertyAdWordsLinks->insert($accountId, $webPropertyId, $adWordsLink);

google-api-php-client library version is latest (2.2.0)

解决方案

From Account management

Write operations in the Management API (e.g. create, update, delete, patch) for Web Property, View (Profile), and Goal resources are currently available as a developer preview in limited beta. If you're interested in using these features, request access to the beta.

Unless i am mistaken you have not applied for access to the beta program. Note it can take up to a month to get access you will hear from Google if you have been granted access.

Assuming that you have applied for beta.

There appears to be a bug in this currently the bug log can be found here. Google has been notified we will have to wait for them to fix it.

这篇关于AdWords链接创建期间出现Google Analytics API 500内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆