This migration guide describes what's new in version 2 of the SDK, and provides developers with tips to migrate from a v1.x implementation. Developers who do not need to migrate from a v1.x implementation can Get Started with Version 2 now.
Introduction
Google Analytics recently released the updated Google Analytics SDK for iOS version 2. Version 2 of the SDK contains support for new features and a new reporting interface designed specifically for app developers.
We recommend that all existing Google Analytics developers migrate to version 2 of the Google Analytics SDK for iOS to take advantage of the new features and reports.
What's New in Version 2
The Google Analytics SDK for iOS version 2 introduces a new reporting experience designed for app developers, powerful new dimensions and metrics, and much more. Here's a look at what developers get with version 2:
- More powerful reports for app developers
- The standard reports have been redesigned for app developers, adding new reports like Engagement Flow and Google Play Sources to help developers gain new insight into user acqusition and experience. Read our Account Configuration Best Practices to learn more about how best to configure your property for version 2.
- New app dimensions and metrics
- New app-specific dimensions and metrics have been introduced with version 2 of the SDK, including Screen Name and Screen Views, App Name, App version, and many more.
- Measure crashes and exceptions
- The Google Analytics SDK for iOS introduces exception measurement and the exception hit type. Using exception measurement, you can measure the number and type of crashes and non-fatal exceptions. To learn how to implement exception measurement, see the Exceptions Developer Guide.
- Custom dimensions and metrics
- Create custom dimensions to segment your data in new ways. Learn more about Custom Dimensions and Metrics.
- Measure social interactions
- Gain new insight into the value of social in your app by measuring user interactions with embedded social plugins and widgets. Learn more about measuring Social Interactions.
Before you Begin
All developers will want to take these two steps before beginning their migration:
- Download the Google Analytics SDK for iOS v2
- Create an app view (profile) that you'll use to access your new app reports and data.
Migrating to Version 2
All developers using the Google Analytics SDK for iOS v1.x should read the Getting Started Guide to implement version 2 of the SDK.
Here are some of the changes developers should be aware when they migrate:
- An EasyTracker library for iOS has not been included with version 2.
trackPageview:
is nowsendView:
in version 2. Learn how to measure screen views with version 2.- The Ecommerce implementation has been simplfied. Learn how to measure in-app ecommerce with version 2.
- Custom variables have been replaced by Custom Dimensions and Metrics. Any
calls to
setCustomVariableAtIndex:
should be updated to take advantage of the new feature. Learn how to implement Custom Dimensions and Metrics with version 2.
If you have advanced data collection needs, such as using multiple tracking IDs in a single implementation, see the version 2 Advanced Configuration Guide to learn more about advanced features of the SDK.