Tip:
Highlight text to annotate it
X
With Google Analytics, you can collect and analyze data about your mobile app,
just like you can with your website.
However, since the technology to build and run mobile apps
is different than the technology used to build websites,
there are differences in how Google Analytics collects data from mobile apps.
Instead of using JavaScript to collect data like you do on a website,
you'll use an SDK, or Software Development Kit, to collect data from your mobile app.
There are different SDKs for different operating systems, including Android and iOS.
SDKs collect data about your app, like what users look at,
the device operating system, and how often a user opens the app.
This data gets packaged as hits, and sent to your Google Analytics account.
This is similar to how the JavaScript code sends hits from a website.
Data from mobile apps is not sent to Analytics right away.
When a user navigates through an app,
the Google Analytics SDK stores the hits locally on the device
and then sends them to your Google Analytics account later
in a batch process called dispatching.
Mobile data collection uses dispatching for two reasons:
First, mobile devices can lose network connectivity,
and when a device isn't connected to the web,
the SDK can't send any data hits to Google Analytics.
Second, sending data to Google Analytics in real time can reduce a device's battery life.
For these reasons, the SDKs automatically dispatch hits
every 30 minutes for Android devices and every two minutes for iOS devices,
but you can customize this time frame in your tracking code
to control the impact on the battery life.
Another important function of the mobile SDK is differentiating users.
When an app launches for the first time
the Google Analytics SDK generates an anonymous unique identifier for the device,
similar to the way the website tracking code does.
Each unique identifier is also counted in Google Analytics as a unique user.
If the app gets updated to a new version, the identifier on the device remains the same.
However, if the app gets uninstalled, the Google Analytics SDK deletes the identifier.
If the app is then reinstalled, a new anonymous identifier is created on the device.
The result is that the user will be identified as a new user, not a returning user,
but no other data in your Google Analytics reports will be impacted.
The mobile SDKs provide a simple way to track user activity from an app,
and collect most of the data you'll need without any customization.
But keep in mind, there are many ways to modify your code
to collect additional information about your users,
their sessions and their interactions with your app.