|
||||||
var CONFIG = { 'attributes': ['OfferId'], 'segments': ['Month'], 'metrics': ['Cost', 'ConversionValue'], 'sourceReport': 'SHOPPING_PERFORMANCE_REPORT', 'dateRange': 'LAST_7_DAYS', 'spreadsheetUrl': 'mysheet', 'tabName': 'Campaigns', 'reportVersion': 'v201809', 'overWrite': 1, }; function main() { var fields = [].concat(CONFIG['attributes'], CONFIG['segments'], CONFIG['metrics']); var query = "SELECT " + fields.join(',') + " FROM " + CONFIG['sourceReport'] + " DURING " + CONFIG['dateRange']; var report = AdsApp.report(query); if(CONFIG['overWrite']) { var spreadsheet = SpreadsheetApp.openByUrl(CONFIG['spreadsheetUrl']); var sheet = spreadsheet.getSheetByName(CONFIG['tabName']); report.exportToSheet(spreadsheet.getActiveSheet()); } else { var rows = report.rows(); while (rows.hasNext()) { var row = rows.next(); sheet.appendRow(row); } } }Let me know your thoughts.
var query = "SELECT " + fields.join(',') + " FROM " + CONFIG['sourceReport'] + " DURING " + CONFIG['dateRange'];
var query = "SELECT " + fields.join(',') + " FROM " + CONFIG['sourceReport'] + " WHERE Cost > 4.48 DURING " + CONFIG['dateRange'];
|
||||||
|
||||||
function main() { var spreadsheet = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/xxx
); var sheetName = 'Auto'; var costMultiplier = 11 * 1000000; var report = AdsApp.report( "SELECT OfferId, Cost, ConversionValue " + "FROM SHOPPING_PERFORMANCE_REPORT " + "WHERE Cost > " + costMultiplier + " " + "DURING LAST_7_DAYS"); report.exportToSheet(spreadsheet.getSheetByName(sheetName)); }@sh...@bluebirdmedia.se: Thank you as well but could you instead provide me a screenshot of the Google Ad UI - Report you are comparing the script report results with? Kindly send them privately through the options I have mentioned previously. I should be able to pinpoint the discrepancies and guide you accordingly thereafter.
var report2 = AdsApp.report( 'SELECT AdGroupId, Id, KeywordText, Impressions, Clicks ' + 'FROM KEYWORDS_PERFORMANCE_REPORT ' + 'DURING 20130101,20130301', { includeZeroImpressions: false, returnMoneyInMicros: true, apiVersion: 'v201809' });
|
||||||
Hello,
I’m James, also a member of the Google Ads Scripts support team. Thank you for looping in.
Yes, you can achieve it by using the forDateRange method to filter the specific entity that you’re trying to retrieve. You may refer here for more information and sample snippets.
Regards,
|
||||||
--
-- 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/wfd0i000000000000000000000000000000000000000000000R83UNG00IoeSjOpCQxGMZVY5Toj0WQ%40sfdc.net.
Hello,
Can you please share with us the following details below via `Reply privately to author` options so that we can further check?
--
-- 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/Bpyn_000000000000000000000000000000000000000000000R8VN5A00he7brc8MSmGCRU-_4ji9Hw%40sfdc.net.
Hello,
Since the private option is not available on your end, then please send the requested information through this email <googleadsscr...@google.com> instead.
Regards,