/GA-Fetch-Java

Simple Java client to fetch data from Google Analytics and save in CSV format.

Primary LanguageJava

Google-Analytics-to-CSV

Simple Java client to fetch data from Google Analytics and export to CSV.

Requires

  • Google Analytics reporting API library v4
    • Can be downloaded from here with documentation to include in your project in Step 2 over here for different IDE's.
  • Apache Commons CSV (for exporting to csv)
    • Can be downloaded from here

Getting started

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