Google Analytics allows us to collect and analyze data from mobile apps in the same way as we do for websites. However, because the technology used to build mobile apps is different than the technology used to build websites, Analytics collects data from mobile apps in a different way. Instead of using JavaScript code, Google Analytics uses an SDK (Software Development Kit).
Currently, Google makes its SDK available to mobile app developers for both iOS and Android. In the case of applications developed for Windows Phone, we will have to go to third-party applications or use the measurement protocol, which we will talk about in the next post.

SDK for mobile devices
The SDK collects data from the user's session in the application, such as what the user sees, the OS of the device or how often the application is opened, the duration of the session, the geographical area...
All of this data is collected as results and sent to your Google Analytics account in much the same way that JavaScript code on a website does, with one exception, this data is not sent immediately.
The reason for this comes from the possibility of finding ourselves with a connection that is not optimal or even be operating with the app offline, and if there is no connection, the SDK will not be able to send any data to the servers. Another reason is the need to minimize the battery consumption of the device that would rise if we were sending data in real time.
To do this, what the Analytics SDK does is to store the data (hits) locally on the device, create a packet of these hits and send them later packaged, by default, every 30 minutes on Android devices and every two minutes on iOS devices, although, obviously, these intervals are customizable in the SDK tracking code.
Another important function of the SDK is to differentiate the users who install the application.
Just like the JavaScript we insert into the website, the SDK, when the application is first launched, generates a unique, anonymous identifier for that device, so each identifier counts for Analytics as a unique user.
This identifier is kept even when the application is updated and only in the case of uninstalling it the SDK will delete this identifier, but only from the device, i.e. we do not lose the data already stored in Analytics.
If the application is reinstalled on the same device, the SDK will generate a new identifier and Google Analytics will identify the user as a new user, not a returning user.

In short, with the SDKs you can easily track the behavior of a user within an application and collect most of the necessary data without having to customize anything. If you want to collect additional data about the user, their sessions and interactions, you can do so by modifying the code you insert in the application.
I invite you to leave your impressions and/or doubts in the contact form and to suggest new topics that you would like me to cover in these tutorials. I will be happy to answer you by email and write in this blog.