如何将Google adwords属性重新连接到我的分析帐户?

时间:2015-01-09 09:30:40

标签: google-analytics google-adwords

我已在我的分析帐户中删除了我的adwords属性,因为它未正确连接。现在无法重新连接它们。通常的方法是:

Analytics-> Admin-> Adwords链接 - >选择AdWords帐户

但我的adwords帐户不再是可变的,因为我将其删除了。我怎样才能找回来?

1 个答案:

答案 0 :(得分:0)

有一个API。 AdWords linking API

// Construct a list of AdWordsAccounts.
AdWordsAccount adWordsAccount = new AdWordsAccount();
adWordsAccount.setCustomerId("123-456-7890");
List<AdWordsAccount> adWordsAccounts = Arrays.asList(adWordsAccount);

// Construct the body of the request.
EntityAdWordsLink adWordsLink = new EntityAdWordsLink();
adWordsLink.setAdWordsAccounts(adWordsAccounts);
adWordsLink.setName("AdWords Link");

try{
  analytics.management().webPropertyAdWordsLinks().insert("123456",
      "UA-123456-1", adWordsLink).execute();
} catch (GoogleJsonResponseException e) {
  System.err.println("There was a service error: "
      + e.getDetails().getCode() + " : "
      + e.getDetails().getMessage());
}

或者只是按照您在网络界面中所说的那样做: Analytics-&gt; Admin-&gt; adwords链接 - &gt;新链接组