--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/50617597-1dcd-43cf-8db3-7cc55813fbe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Do i need to send you my id and script name to check in real campaign?
function main() {
cleardata();
getSitelinksForCampaign();
}
function cleardata()
{
var SPREADSHEET_URL = 'INSERT_SPREADSHEET_URL_HERE';
var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
//var activesheet=SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
spreadsheet.getRange("A4:C1000").clearContent();
}
function getSitelinksForCampaign() {
var SPREADSHEET_URL = 'INSERT_SPREADSHEET_URL_HERE';
var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
var email = spreadsheet.getRange('B1').getValue();
// var sheet1 = spreadsheet.getSheetByName('Report1');
var i=spreadsheet.getLastRow();
var campaignIterator = AdsApp.campaigns().get();
Logger.log('Total count of campaign: ' + campaignIterator.totalNumEntities());
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
Logger.log('campaign: ' + campaign.getName());
var adgroupIterator=campaign.adGroups().get();
while (adgroupIterator.hasNext()) {
var adgroup = adgroupIterator.next();
var sitelinksIterator = adgroup.extensions().sitelinks().get();
spreadsheet.appendRow([campaign.getName(),adgroup.getName(),sitelinksIterator.totalNumEntities()])
Logger.log('Total count of sitelinks: ' + sitelinksIterator.totalNumEntities());
}
}
MailApp.sendEmail(email, 'Subject : ' + AdsApp.currentAccount().getCustomerId() + ' Sitelink Report', '',
{htmlBody: "Report created"});
}
Removed but same issue.
Do i need to send you my id and script name to check in real campaign?
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/584e238b-8a64-49a2-8d05-8b747650e2e1%40googlegroups.com.
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/e83b13d9-5b49-4d18-861d-7b4e334c7655%40googlegroups.com.