我在電子表格中創建了一個腳本,用於將AdWords報告導出到電子表格。AdWordsApp在Apps腳本代碼編輯器中不可用 - ScriptyApp錯誤
function Export(ss, Ads180, Ads14){
var newDate = Utilities.formatDate(new Date(), "GMT", "yyyyMMdd");
var SixMonths = Utilities.formatDate(subDays(new Date(),180), "GMT", "yyyyMMdd");
var TwoWeeks = Utilities.formatDate(subDays(new Date(),14), "GMT", "yyyyMMdd");
var report = AdWordsApp.report(
"SELECT AdGroupName,Headline, Description1, Description2, HeadlinePart1, HeadlinePart2, Description, Impressions, Ctr, Conversions, Id" +
" FROM AD_PERFORMANCE_REPORT" +
" WHERE Status='ENABLED' AND CampaignName="+campaignName+
" DURING "+SixMonths+","+newDate+"");
report.exportToSheet(Ads180);
report.exportToSheet(ss.getSheetByName('Summary'));
report = AdWordsApp.report(
"SELECT AdGroupName,Headline, Description1, Description2, HeadlinePart1, HeadlinePart2, Description, Impressions, Ctr, Conversions, Id" +
" FROM AD_PERFORMANCE_REPORT" +
" WHERE Status='ENABLED' AND CampaignName="+campaignName+
" DURING "+TwoWeeks+","+newDate+"");
report.exportToSheet(Ads14);
}
我有一個問題,當我得到了以下錯誤:
ReferenceError: "AdWordsApp" is not defined
於是我問AdWords指令碼論壇,他們建議使用AdWordsApp Library。 我用它,但現在我得到這個奇怪的錯誤:
ReferenceError: "ScriptyApp" is not defined The AdWordsApp Library and the Error I don't know what to do next, could you please advise?
感謝, 帽兒
你打算通過你的AddWords賬戶進入腳本編輯器嗎?你有一個AddWords帳戶嗎? –
我要進入電子表格中的腳本編輯器。 是的,我擁有AdWords帳戶(不是mcc) –
看起來AdWordsApp服務通過常規的Apps腳本代碼編輯器不可用。在常規的Apps腳本代碼編輯器中找不到任何可啓用AdWords的內容。我認爲您需要登錄到AdWords,然後在登錄到您的帳戶頁面時打開其腳本編輯器。 –