Simple Java client to fetch data from Google Analytics and export to CSV.
- Google Analytics reporting API library v4
- Apache Commons CSV (for exporting to csv)
- Can be downloaded from here
Follow the first step over here and download the JSON secret file, rename it to client_secrets.json and put it in the same folder as the program then run the program. If everything goes fine the program will generate a file test.csv in the same folder.
For changing what sort of data is fetched change the dimensions and metrics. A complete list of both is available here