Wednesday, March 20, 2013

Store Account Performance Report in a Google Doc

Day 2 and I'm still playing around with the new reporting API. I figured I'd post something that people started asking a little about from my previous post about Storing Account Level Quality Score which is storing all account level performance in a spreadsheet.

All you need to do is create a brand new Google Doc to store your data and paste that url into the script. The first time the script runs, it will create column headings. You can add, remove, or rearrange columns as you like by moving the column names around. You should reset your spreadsheet after doing this though.

Thanks,
Russ

/**************************************
* Store Account Performance Report in a Google Doc
* Version 1.1
* Changelog v1.1 - Removed apiVersion, Removed get spreadsheet
* Created By: Russ Savage
* FreeAdWordsScripts.com
**************************************/
function main() {
  var spreadsheet_url = "Your Spreadsheet Url Goes Here";
  var date_range = 'YESTERDAY';
  var columns = ['Date',
                 'AccountCurrencyCode',
                 'AccountDescriptiveName',
                 'AccountId',
                 'AccountTimeZoneId',
                 'CustomerDescriptiveName',
                 'ExternalCustomerId',
                 'PrimaryCompanyName',
                 'PrimaryUserLogin',
                 'Device',
                 'AverageCpc',
                 'AverageCpm',
                 'AveragePosition',
                 'Clicks',
                 'ConversionRate',
                 'ConversionRateManyPerClick',
                 'Conversions',
                 'ConversionsManyPerClick',
                 'ConversionValue',
                 'Cost',
                 'CostPerConversion',
                 'CostPerConversionManyPerClick',
                 'Ctr',
                 'Impressions',
                 'SearchBudgetLostImpressionShare',
                 'SearchExactMatchImpressionShare',
                 'SearchImpressionShare',
                 'SearchRankLostImpressionShare',
                 'ValuePerConversion',
                 'ValuePerConversionManyPerClick',
                 'ViewThroughConversions'];
  var columns_str = columns.join(',') + " ";
  
  var sheet = SpreadsheetApp.openByUrl(spreadsheet_url).getActiveSheet();
  if(sheet.getRange('A1:A1').getValues()[0][0] == "") {
    sheet.clear();
    sheet.appendRow(columns);
  }
  
  var report_iter = AdWordsApp.report(
    'SELECT ' + columns_str +
    'FROM ACCOUNT_PERFORMANCE_REPORT ' +
    'DURING ' +date_range).rows();
  
  while(report_iter.hasNext()) {
    var row = report_iter.next();
    var row_array = [];
    for(var i in columns) {
       row_array.push(row[columns[i]]);
    }
    sheet.appendRow(row_array); 
  }
}

60 comments:

  1. i see computer, mobile and table populate...

    any way to get each of those 3 in their own sheet?

    ps - any way to post this data into a sheet that is outside the adwords account?

    ReplyDelete
  2. Hi Russel,

    How to use "CONTAINS" (or equivalent) in "SELECT" statement?

    Thanks,
    Ren

    ReplyDelete
    Replies
    1. Hi Renjith, Sorry for not getting back to you. You can find more information about writing AWQL queries here: The AdWords Query Language (AWQL).

      The short answer to your question is to add a WHERE clause just before the DURING in the query above. Then you put your conditions. For example, "WHERE CampaignName IN ['Campaign 1','Campaign 2']".

      Thanks,
      Russ

      Delete
  3. Nice article. I have read the whole article.It is nicely explained. People who are stuck in storing account level quality score should read this to clear their doubts. If you have any problem regarding Norton, please visit Norton Setup

    ReplyDelete
  4. I would try to make a report for this page https://essaywriters.site/professional-thesis-writer as an example given. Thanks!

    ReplyDelete
  5. You can likewise disclose to Google how regularly your pages are refreshed and the date that each page was last adjusted. For instance your landing page may be refreshed each day, while a specific item page may just be refreshed on a yearly premise. finance

    ReplyDelete
  6. I gotta favorite this website it seems very helpful . clenbuterol achat

    ReplyDelete
  7. I am looking for and I love to post a comment that "The content of your post is awesome" Great work! Agentur für Google Adwords

    ReplyDelete
  8. Quickbooks support is a tech help assistance provider for the issues in quickbooks like installation error, setup fails, login id fails, etc and in order to fix them you need to contact quickbooks support and they will provide you quickbooks customer support number and from there you will get Quickbooks support

    ReplyDelete
  9. QuickBooks support is a reliable accounting software that makes the workflow super easy for the accountants. With numerous automated features, it allows the users to save precious time. Many firms use the QuickBooks suppoort program to manage their accounts effectively. There are some issues that such as the code H202 and issues related to QuickBooks desktop, which can be fixed by connecting with QuickBooks desktop support. Quickbooks Support | Quickbooks Desktop Support

    another link
    office.com/setup | www.office.com/setup | office setup | office com setup

    ReplyDelete
  10. office.com/setup includes applications like PowerPoint, Outlook, to install on your device. Everything you need is to install office.com/setup. Every application is key to reduce the work. This software is made with the latest features so you can easily install it. You can easily make a presentation with this software.
    It gives a complete set of tools that you need to get the work done.
    office.com/setup | www.office.com/setup | office setup | office com setup


    another link:

    Quickbooks Support | Quickbooks Desktop Support

    ReplyDelete
  11. You possess lifted an essential offspring..Blesss for using..I would want to study better latest transactions from this blog..preserve posting.. https://www.pageview.com/ In this particular article, you will see a summary, satisfy browse this post.

    ReplyDelete
  12. I've heard some people say that your ads need to go here or they're on your Website. To a certain point they are correct. What works in offline ads often does the same online. Draw an imaginary "Z" on your monitor's screen. Where the path of the "Z" is at is where you want your ads to fall on the page.Free Negative Keyword List Generator

    ReplyDelete
  13. free robux is the best online gaming currency generation website to unlock new gaming accessories and characters in the game.
    This is because of the free robux hack found by us.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Don't worry about tax slab you can get all your information from the site viewmypaycheck in easy step just check the website you will learn all thing viewmypaycheck

    ReplyDelete
  16. immediately discovered that those ads are set by Google who just engages publicizing spending plans of huge extent.Free Google Ads Audit

    ReplyDelete
  17. An AdWords account review is the way toward assessing the general adequacy of your showcasing efforts and make your record run easily so as to build your ROI. Google Ads Expert

    ReplyDelete
  18. Any numbers of tokens can be drawn. All you need to do is to choose with the type of Chaturbate tokens that you need the most.
    use of the coinmaster free spins to keep moving ahead of your enemies.

    ReplyDelete
  19. If you are using the software of QuickBooks and if you face any kind of issue or error in QuickBooks then use QuickBooks support number.

    ReplyDelete
  20. Quickbooks software provide Business Account related problem. If you have any problem in your Account related. visit Quickbooks online Support

    ReplyDelete
  21. we have access to free Xbox Live Gold accounts on this site, so many can find these codes and our subscribers will be very tired
    xbox live codes reddit

    ReplyDelete
  22. Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.WPNeon.com

    ReplyDelete
  23. Well the guidelines have changed. The web currently gives a disappointed voice a scope of thousands with a practically interminable time breaking point to communicate.buy reviews on google

    ReplyDelete
  24. for any business, accounting is an important factor and you can do that with the help of Quickbooks which is an advanced accounting tool that offers multiple accounting features and in case you need any help assistance regarding Quickbooks you can contact Quickbooks support and ask for Quickbooks support

    ReplyDelete
  25. Nice blog and it is very helpful!
    QuickBooks Proadvisor Support Phone Number
    Facing problem or Error with QuickBooks Get Instant tech support with 24*7 QuickBooks Proadvisor Support Phone Number 844-908-0801

    ReplyDelete
  26. We are here to solve your problem related to QuickBooks just make a call get instant solution Quickbooks Payroll Support Phone Number 844-908-0801

    ReplyDelete
  27. if you are facing any kind of error while using McAfee activate then you can simply visit our website where we cover all-most each and every error in details, also you can get help from our technical assistant. we are 24*7 available for our users.

    ReplyDelete
  28. Nice blog and very helpful!
    Facing Error and any glitch with QuickBooks Dial On Our 24*7Quickbooks Support Phone Number844-908-0801

    ReplyDelete
  29. Arrival of technical errors in QuickBooks is a common issue. But don’t fret, Our QuickBooks experts come to the rescue by giving quick response. Dial QuickBooks Technical Support Number 855-9O7-O4O6.

    ReplyDelete
  30. Nice content!
    Getting Error and issue with QuickBooks.
    Get solution with our Quickbooks Support Phone Number 844-908-0801

    ReplyDelete
  31. We provide technical help for all of the QuickBooks issues that are users are facing. We deliver solutions taking just a few seconds only.Avail benefits from our support team dial QuickBooks For Mac Support Phone Number 1-855-907-0406.

    ReplyDelete
  32. Thank you very much for sharing this kind of beautiful article! Please keep share more article like this. If you want to play Bubble Shooter game online without paying any extra charge, so just follow our bubble games website free bubble shooter and enjoy this entertaining game.

    ReplyDelete
  33. Nice content and well explained!
    QuickBooks provide 24*7 tech Support to resolve any QuickBooks issues and problem.
    Dial our QuickBooks technical Support Phone Number +1-844-908-0801

    ReplyDelete
  34. Facing issues and error with QuickBooks.Get instant solution with our expert.
    Visit for more info QuickBooks error 6073
    Dial on tech Support Number +1-844-908-0801.

    ReplyDelete
  35. Nice blog!
    Get solution regarding QuickBooks with our Expert.
    Dial on our QuickBooks Support Phone Number +1-844-908-0801.

    ReplyDelete
  36. QuickBooks Online Support || +1-888-308-0575 || New Jersey(USA)~how to contact customer care
    Our Technical expert give the solution immediately. QuickBooks Support is an accounting Software. You can take help our QuickBooks Online Support. Which is help you to efile your tax. If you have any technical issue regarding installation of QuickBooks Support Accounting Software. You can contact our technical Expert 24/7. They resolve your query immediately.
    http://youraccuracy.com/quickbooks-online-support/

    ReplyDelete
  37. QuickBooks Online Support || +1-888-308-0575 || Oregon(USA)~Customer care Number
    If you have any technical issue regarding installation of QuickBooks Support Accounting Software. You can contact our QuickBooks Online Support 24/7. They resolve your query immediately. Our Technical expert give the solution immediately. QuickBooks Support is an accounting Software.
    http://youraccuracy.com/quickbooks-online-support/

    ReplyDelete
  38. Quickbooks customer service is an international support service that helps you to get instant help, advice and answers from the Quickbooks online team, for any query you can call us, you can also check our site and click on help there, you get solutions to your @ https://youraccuracy.com/quickbooks-online-support//queries. You can contact us from anywhere (Quickbooks customer service provides you phone numbers according to your state/country) . We are 24/7 available for you. If you want solutions to all your problems then can’t wait, just call us and you get the solution to all your problems.

    ReplyDelete
  39. QuickBooks Payroll Support service helps you to build your business, track your inventory and manage your profits. In their advanced inventory management helps to track items by serial number, bin location and transfer between warehouses. For any kind of information call us on our QuickBooks Payroll Support toll-free number +1-888-308-0575 on 24/7. Our expert team helps you to solve any kind of problem.
    https://youraccuracy.com/quickbooks-payroll-support/

    ReplyDelete
  40. QuickBooks Help +1-805-617-3111 that helps to manage your business Account and company from one device or computer.that software manages any time anywhere. Quickbooks Cloud-based Accounting software with the help of advance online Accounting Application software. You can easily track and manage your Account.

    ReplyDelete
  41. In this era, QuickBooks comes under the best accounting software if you are working on QB cloud based accounting software and start facing issues while performing financial accounting tasks then connect rapidly on our QuickBooks Help +1-805-617-3111 to solve the issues instantly.

    ReplyDelete
  42. Quick Help? Instant Help? If you are willing for appropriate results by Quick and reliable solutions just call on ourQuickBooks Help +1-805-617-3111 and settle down the queries in just a few seconds, All QB users can contact us whether beginners or experienced users. There is no discrimination in our service.

    ReplyDelete
  43. QuickBooks error support number can be very useful if you are using QuickBooks account software for your small and medium sized business. Accounting software plays an important role in business accounting and makes your business accounting easy. So it is also important that you should take care of your accounting software as your business. If you are using QuickBooks accounting software then we are here to take care of it at our QuickBooks technical support service to resolve all your technical and functional errors through our toll-free QuickBooks phone number.
    QuickBooks Online Support

    ReplyDelete
  44. Well explained!
    QuickBooks provide 24*7 live support get instant solution with Our expert.
    Dial QuickBooks Support Number +1-844-908-0801.

    ReplyDelete
  45. Well explained
    Get effective Solution of QuickBooks best accounting software just get in touch with expert for instant solution.
    Dial QuickBooks Customer Service Number +1-844-908-0801.

    ReplyDelete
  46. Nice Blog !
    Reach us whenever you feel difficulty in solving any QuickBooks issues. The experts will assist you 24*7. Just take your phone and dial our QuickBooks Support Phone Number Inidiana 1-855-6OO-4O6O.

    ReplyDelete
  47. Nice Blog & Informative Blog !
    Resolve QuickBooks Error 6123 0 with effective solution. If you want instant aid, contact us at 1-855-6OO-4O6O. The error 6123 0 usually arrives while upgrading the software, restoring a back-up or opening a company file over a network.

    ReplyDelete
  48. Mcafee activate product key Antivirus software works to block viruses from entering your computer system and kill or quarantine viruses that have some broken.Download, Install and Activate your mcafee product card from mcafee live safe, mcafee total protection, internet security, mcafee removal tool

    ReplyDelete
  49. Nice Blog!
    Know More About How to Delete Deposits in QuickBooks? Get live support 24*7 from QuickBooks expert on tool-free Number.
    Click here to know How to Delete Deposits in QuickBooks
    Dial for any tech support: 1-844-908-0801

    ReplyDelete
  50. QuickBooks Payroll Error 61102 occurs mainly when users send the payroll information to Intuit without giving PIN or password.If you still have any doubt or query regarding the process, you can consult our QuickBooks experts at 1-855-6OO-4O6O.

    ReplyDelete
  51. if you are playing fortnite but don't have enough vbucks to unlock favorite character then you can download v-bucks generator by this you can create unlimited vbucks and unlock your all favorite characters.

    ReplyDelete
  52. if you are playing roblox game. you can try free robux generator to create robux

    ReplyDelete

  53. QuickBooks provide Premier Support for QuickBooks User to make QuickBooks more easy and fruitful.
    Dial +1-855-511-6911 QuickBooks Enterprise Support Phone Number

    ReplyDelete
  54. Accountants always want to get help from those experts who are able to provide assistance with 100% satisfaction, then you can simply dial the QuickBooks Phone Number. QuickBooks Support is committed to serve 100% satisfaction and give extraordinary and the best QuickBooks services. And QuickBooks Accounting Software has many of the services and tools by which you can get complete support for handling all the easy & tough business accounting tasks.

    ReplyDelete
  55. Many people say go with top packers and movers Pune but the truth is they are very expensive. So you can go with a local packers and movers pune / packers and movers Chennai near you.

    ReplyDelete
  56. Well explained and informative blog. To get QuickBooks Support click bellow or dial our Support Phone Number.

    QuickBooks Customer Service Phone Number 1-855-600-4060
    QuickBooks Phone Number 1-855-600-4060
    QuickBooks Support Number 1-855-600-4060
    QuickBooks Customer Service Number 1-855-600-4060
    QuickBooks Customer Service 1-855-600-4060
    QuickBooks Customer Support Number 1-855-600-4060
    QuickBooks Customer Support 1-855-600-4060

    ReplyDelete