Magically Exporting Google Analytics Data to Google Spreadsheets
To make this easy to do, we’ve added a script to the Spreadsheets script gallery that handles all this work - no code required. The script is called Google Analytics Report Automation (Magic).
This has been a big request from a lot of people, including me. I'm really excited that it's easy to pull data from Google Analytics into Google Spreadsheets.