Monday, April 22, 2013

Store Account, Campaign, AdGroup, and Keyword Level Quality Score

UPDATE: 2014-02-15 - I updated the script to v2.0 which speeds the script up dramatically, includes the ability to store data into a CSV and use whatever date range you like for the stats.

I've had a lot of good feedback on my previous script: Store Account Level Quality Score. To that end, I've been asked a few times about storing Campaign and/or AdGroup level quality scores as well so I figured it would be a good time for an update.

Below is a script that will attempt to store Account, Campaign, and AdGroup level quality scores for the top 50000 keywords in your account. It will store the results in a google spreadsheet. In order for this to work, you will need to set up a new google spreadsheet. with three sheets named Account, Campaign, and AdGroup. You can simply make a copy of my spreadsheet found here (File > Make a copy...) : Account, Campaign, AdGroup Quality Score Spreadsheet (No longer needed as of v1.1)



  1. Hi Russ, thanks for this awesome script. For some reason however, when I specify the date range to being the last 30 days, it only gives me yesterday's and today's data for the keywords in my account? To you know why this might be happening?



    1. It only start to collect data from the day you run it

  2. Hi Russ! Thanks for the script! I'm trying to run the script, but I'm receveing this warning:
    "Invalid reporting query: KEYWORDS_PERFORMANCE_REPORT. (file, line 165)"

  3. I am also getting this error

    "Invalid reporting query: KEYWORDS_PERFORMANCE_REPORT. (file, line 165)"

  4. Hello,
    I got these 2 different errors in 2 different accounts:
    1. TypeError: Cannot read property "length" from undefined. (file, line 106)
    2. This action would increase the number of cells in the workbook above the limit of 5000000 cells. (file, line 104)

    Thanks for your amazing work.

  5. I'm getting this error too - "TypeError: Cannot read property "length" from undefined. (file, line 106)"