Google Analytics SDK for Android adds e-commerce tracking

Google (NASDAQ:GOOG) introduced a new version of its Analytics SDK for Android that adds support for e-commerce transaction tracking, enabling developers to better understand how much revenue they're earning via in-app purchases and which products are most popular with consumers. Writing on the Android Developers Blog, Google engineers Jim Cotugno and Nick Mihailovski state that purchase confirmations are the most effective way to track transactions: "For example, if you have a callback method that is called when a purchase is confirmed, you would call the tracking code there... The Google Analytics SDK provides its own Transaction object to store values Google Analytics collects. The next step is to copy the values from the list of PurchaseObjects into a Transaction object. The SDK's Transaction object uses the builder pattern, where the constructor takes the required arguments and the optional arguments are set using setters. You then add the transaction by building it and passing it to a Google Analytics tracking Object."

The next step, according to Cotugno and Mihailovski: Tracking each item within the transaction. "This is similar to tracking transactions, using the Item class provided by the Google Analytics SDK for Android. Google Analytics uses the OrderID as a common ID to associate a set of items to its parent transaction. Let's say the PurchaseObject above has a list of one or more LineItem objects. You can then iterate through each LineItem and create and add the item to the tracker." Once all transactions and items are added to the tracker, calling "tracker.trackTransactions();" sends all transactions to the dispatcher, which transmits data to Google Analytics. After data is collected, developers can log into the Google Analytics Web Interface and go to the Conversions > Ecommerce > Product Performance report to determine how much revenue each product generated. The Analytics SDK for Android is available for download here.

Late last month, Google rolled out Android Market merchant sales reporting, offering developers more convenient access to their financial performance. The reports--based on Google Checkout financial data--supply per-transaction data including time, date, transaction status, device model, currency of sale and currency conversion rate. Developers may download these reports as CSV (comma-separated values) files to enable further analysis. Reporting data eventually will date back as far as January 2010--moving forward, Google will release new monthly sales reports on the tenth day of the following month.

For more:
- read this Android Developers Blog entry

Related articles:
Google unveils Android Market merchant sales reporting
Google poised to launch in-app Android Market billing
Google extends Android Market to the web