Hello there,
I have an already made project that i use for some of my customers to export raw data from google analytics like metrics and dimensions from several GA accounts.
I just have the google analytics part for you solve, and it can be exported to SQL language so you can better analize and play with it.
If this makes sence to you, contact me.
Sebastian