|
||||||
So what is my next step?
Thanks.
Alexz Wong
Assistant Performance Manager

Unit 808, Core E, Cyberport 3
100 Cyberport Road
Hong Kong
Ph: +852 2911 1583
Fax: +852 2511 6802
COMvergences top media Agencies in Hong Kong 2020
Campaign’s Hong Kong Media Agency of the Year 2020 - Gold
Campaign’s APAC Performance Agency of the Year 2020 - Gold
Marketing Magazine’s Hong Kong Media Agency of the Year 2020 - Gold
Marketing Magazine’s Hong Kong Performance Agency of the Year 2020 - Gold
Marketing Magazine’s Hong Kong Search Agency of the Year 2020 - Gold
WARC’S Most awarded holding company for creativity 2020
From: Google Ads Scripts Forum on behalf of adsscripts <adwords...@googlegroups.com>
Sent: Friday, November 5, 2021 5:12 PM
To: adwords...@googlegroups.com
Subject: RE: Populate data from the first empty row
|
CAUTION: This email originated from the Internet |
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit
https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
adwords-scrip...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-scripts/n66s7000000000000000000000000000000000000000000000R23DJS003ArR0kQXR12nuxZDQC5LYQ%40sfdc.net.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution, or copying of this email or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this email in error, please notify the sender immediately.
var ss = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
var sheet = ss.getSheetByName(SHEET_NAME);
var report = AdsApp.report(
'SELECT CampaignName, Clicks, Impressions, Cost ' +
'FROM CAMPAIGN_PERFORMANCE_REPORT ' +
'WHERE Impressions < 10 ' +
'DURING LAST_30_DAYS');
var rows = report.rows();
while (rows.hasNext()) {
var row = rows.next();
var campaignName = row['CampaignName'];
var clicks = row['Clicks'];
var impressions = row['Impressions'];
var cost = row['Cost'];
Logger.log(campaignName + ',' + clicks + ',' + impressions + ',' + cost);
sheet.appendRow([campaignName, clicks, impressions, cost]);
}
Let me know if you need anything else.