Guest User

Untitled

a guest
Feb 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. /**
  2. *
  3. * Google Shopping Conversion Report Script
  4. *
  5. * This script creates a report for conversion and ROAS data
  6. * segmented at the Product Group Level
  7. * using data from the last 30 days
  8. *
  9. * The primary purpose of this script is to generate a report
  10. * That can then be used for an ROAS-based, automated bidding script
  11. * For use in your Google Shopping campaigns
  12. * Find this full script at adventureppc.com/blog
  13. *
  14. * Version: 1.2
  15. *
  16. * Google AdWords Script maintained by adverntureppc.com
  17. **/
  18.  
  19. function main() {
  20.  
  21.  
  22. //insert the name of your campaign(s) in between the quotes below
  23. var campaignNameContains = "YOUR CAMPAIGN NAME HERE";
  24.  
  25. //insert the shareable URL of your new Google Spreadsheet between the quotes below
  26. //you may have to create a new Google Spreadsheet and enable sharing
  27.  
  28. var url = 'YOUR URL HERE';
  29. var ss = SpreadsheetApp.openByUrl(url);
  30. var sheet = ss.getActiveSheet();
  31. var report = AdWordsApp.report(
  32. "SELECT CampaignName, ProductGroup, AdGroupId, Id, CpcBid, AverageCpc, Impressions, Clicks, Cost, Conversions, SearchImpressionShare, ConversionValue " +
  33. "FROM PRODUCT_PARTITION_REPORT " +
  34. "WHERE CampaignName CONTAINS_IGNORE_CASE '" + campaignNameContains + "' " +
  35. "DURING LAST_30_DAYS");
  36.  
  37. report.exportToSheet(sheet);
  38. }
Add Comment
Please, Sign In to add comment