Thursday 14 July 2011

Back in May, we announced Version 1.2 of the Google Analytics SDK for Android.

Today we’re happy to announce that Google Analytics SDK for iOS version 1.2 has been released.  This new version supports Ecommerce tracking as well as the new debug and dry run modes, just like its Android counterpart.

Ecommerce Tracking
With Ecommerce mobile tracking, you can capture transaction and product information, send the data to Google Analytics, and then analyze which products performed best. Of course, because this is all within Google Analytics, you can also tie transaction data back to app usage behavior. See the Google Analytics SDK for iOS developer docs to learn how to implement this feature.

Debug and Validation
In addition to Ecommerce, we’ve added new debug and dry run modes to make it easier to validate your Google Analytics implementation.

Debug Mode:

[[GANTracker sharedTracker] setDebug:YES];

With debug mode, all data requests to Google Analytics are sent to the debug console.

Dry Run:

[[GANTracker sharedTracker] setDryRun:YES];

The dry run mode sends all tracking data locally so that you don’t corrupt your production data.  Just be sure to turn it off before releasing your app, otherwise you won’t collect any usage data.


Thursday 7 July 2011

With our recent Social Plugin Analytics launch you now have the ability to analyse how users engage with any social plugin such as Google’s +1 button and Twitter’s Tweet button. Now it’s time for the lowdown on how to set this feature up to work for you. If you are a developer, you should pay particularly close attention.

If you’ve added +1 buttons to your site and your Analytics implementation is up to date, integration is automatic and you should already see data in your account. You can ensure the +1 integration is working by taking some simple steps.

If you want to integrate with other social plugins, like Twitter, we’ve also made it really easy. The latest version of the tracking code has a new _trackSocial method to capture various aspects of a social plugin interaction. Using the async javascript snippet, the easiest way to call this method is to use:

_gaq.push([‘_trackSocial’, socialNetwork, socialAction]);

And if you’re using the traditional snippet you’ll need to use this syntax:

var pageTracker = _gat._createTracker(‘UA-xxxxx-y’);
pageTracker._trackSocial(socialNetwork, socialAction);

You then want to call this method somewhere where you know the social plugin has been clicked on. We’ve included some example on how this work with Twitter’s plugin API as well as Facebook’s plugin API and you can see a working demo here. Sweet!

If you are building an integration for use by several Analytics users we encourage you to use the code for the async snippet for now. Also, to enable the development of integrations such as these we would like to share with our customers that we are working toward better compatibility between the sync and async tags with the goal of enabling calls such as _trackSocial to work for both version with the same syntax.

Finally, if you are a developer of a content management plugin which adds social plugins to websites, or if you build social plugins, we want to work with you! Ideally we’d love for all users of your plugin and Google Analytics to have seamless social analytics. In the developer community spirit we’re giving out free t-shirts to the first 100 developers who integrate a social plugin, or a Content Management plugin that adds social widgets to sites with Google Analytics. Let us know what you’ve done by submitting your plugin here.

UPDATE: 7/8/11 5:30pm PST, corrected references to the social plugin analytics feature.