This is a simple script that will fetch the data from Google analytics and save it to the database on my domain.
This piece of code should connect to Google analytics account via Google analytics API.
1. index page will show Google analytics authorize button
2. After authorization, user will see dropdown list of accounts he has in his Google analytics account and option to select date range
3. After selecting account and date range script will save the following data to the database (I will provide database) on my domain.
4. The data that should be saved to the database is: organic traffic, refferal traffic, direct traffic, selected data range (month), site name for which report is created.
Basically this script will be only used by me and on my domain, so there is no need for login system or anything complicated. Script should be based on [url removed, login to view]