Google Analytics Command Line Utility
Query and download Google Analytics from the command line. This small console application is suitable for scripting in batch jobs and for automated reports. Supports output to CSV for further data manipulation.
Usage
Command Line Google Analytics Client
flipbit.co.uk
Usage:
analytics.exe -username [username] -password [password] [options]
Valid Options:
-text Optional. Display results as a text file.
-csv Optional. Display results as a CSV file.
-sites [site1,...] Optional. Specify the sites to query.
Defaults to all sites in the account.
-from [date] Optional. Specify the first date which to.
query data for. Defaults to yesterday.
-to [date] Optional. Specify the last date which to.
query data for. Defaults to today.
-max [maximum] Optional. Specify the maximum number of
results to return. Defaults to 10.
-metric [metric1] Optional. Set the metric to query.
Defaults to page views. For a complete list,
see below.
-dimension [dimension1,...] Optional. Display the dimensions to display.
Defaults to page path. For a complete list,
see below.
Valid Metrics:
Bounces, Entrances, Exits, NewVisits, Pageviews, TimeOnPage, TimeOnSite,
Visitors, Visits, AdCost, AdClicks, CPC, CPM, CTR, Impressions,
UniquePageviews, ItemQuantity, ItemRevenue, TransactionRevenue, Transactions,
TransactionShipping, TransactionTax,UniquePurchases, SearchDepth,
SearchDuration, SearchExits, SearchRefinements, SearchUniques, SearchVisits,
Goal1Completions, Goal2Completions, Goal3Completions, Goal4Completions,
GoalCompletionsAll, Goal1Starts, Goal2Starts, Goal3Starts, Goal4Starts,
GoalStartsAll, Goal1Value, Goal2Value, Goal3Value, Goal4Value, GoalValueAll
Valid Dimensions: (Specify up to 10)
Browser, BrowserVersion, City, ConnectionSpeed, Continent, CountOfVisits,
Country, Date, Day, DaysSinceLastVisit, FlashVersion, Hostname, Hour,
JavaEnabled, Language, Latitude, Longitude, Month, NetworkDomain,
NetworkLocation, PageDepth, OperatingSystem, OperatingSystemVersion,
Region, ScreenColors, ScreenResolution, SubContinent, UserDefinedValue,
VisitorType, Week, Year, AdContent, AdGroup, AdSlot, AdSlotPosition,
Campaign, Keyword, Medium, ReferralPath, Source, ExitPagePath,
LandingPagePath, PagePath, PageTitle, Affiliation, DaysToTransaction,
ProductCategory, ProductName, ProductSku, TransactionId, SearchCategory,
SearchDestinationPage, SearchKeyword, SearchKeywordRefinement, SearchStartPage
SearchUsed
For more information about the Google Analytics API, see:
http://code.google.com/apis/analytics/
For more information about this application, see:
http://www.flipbit.co.uk/
Example Output
C:\>analytics -username user@example.com -password password1 -width 80 Google Analytics for 02 October 09 Top Content for seogrep.com =========================== 29 : / 29 : /site/results 28 : /site/loading 10 : /site/domain-results/ 5 : /dead-links/results 4 : /user/edit 3 : /page/results/6Z3 3 : /site/view/IK 2 : /dead-links/results/bad 2 : /dead-links/results/ok C:\>