Generating Reports


Examples of the different types of reports can be seen on the examples page.

Basic usage of the report generation tool is as follows; this runs from the command line (or by using 'Run...' from the Start Menu in Windows, and entering 'cmd') --user=USERNAME --pass=PASSWORD --ID=ANALYTICSID --start_date=YYYYMMDD --end_date=YYYYMMDD --filename=FILENAME --conf=CONF

The ANALYTICSID is the reporting ID which you can get from the URL when you are logged into the Google Analytics console. A typical URL looks like ''; in this case it's the XXXXXX that you need.

The easiest approach is to put all of the report configuration options into a configuration file. Here's a simple example: --start_date=20100728 --end_date=20100729 --filename=demo1.xls --conf=demo.conf

Basic Options

  • --user=USERNAME, --pass=PASSWORD, --id=ANALYTICSID

    These are the Google Analytics username, password and reporting ID respectively. These parameters are mandatory.

  • --start_date=YYYYMMDD, --end_date=YYYYMMDD

    Start and end dates respectively. The total interval includes both start and end dates. Date format is YYYY-MM-DD or YYYYMMDD.

  • --filename=FILENAME

    Name of file in which to save reports. If not specified, output is sent to the screen. The filename extension, if given, is used to determine the file format, which can be xls, csv or txt.

  • --conf=CONF

    Specify a configuration file from which to read options, including advanced templating options. Start with this demo.conf and adapt it to your needs.

Detailed Options

All options are described in full detail in the documentation of