IOS app analytics: How to monitor the usage of your IOS app for free

What is SoftMeter?

SoftMeter application analytics and statisticsQuick answer:

SoftMeter is "Google Analytics for desktop applications".

Longer answer:

Google Analytics (GA) is the most popular website statistics tool. It shows statistics about the visitors to your website. GA can also track Firebase mobile apps.

SoftMeter is a very small software library that extends the coverage of GA to include desktop applications (Windows and MacOS), and mobile apps (IOS iPhone and iPad).

By including SoftMeter in your software you will be able to see how users around the world use your application, just like you monitor visitors' traffic on your website.

SoftMeter (mobile application analytics tool) provides app analytics to IOS apps

SoftMeter, with its 0.9 version, added support for IOS devices (iPhones and iPads). Now, SoftMeter's compatibility list covers Windows, MacOS and IOS.

Under IOS, the library comes as an IOS framework bundle that you can include in your app's bundle.

The API is simple, so you can add application analytics to your app, in less than one day.

There is a detailed checklist of the steps involved. That list is for all editions on SoftMeter and guides you to think and address all aspects of having application analytics, not only the technical steps.

Here, we will focus on the implementation of the OS edition.

You can see simple examples of adding application analytics to your IOS app.

How to add app analytics to your IOS software.

1. Download from GitHub our Google Analytics IOS SDK with the filename "softMeter-IOS.framework".

2. Download the ready IOS sample app from our GitHub.

3. In your (note the .mm extension) add the following code:
(full example here)

#include "../../../bin/libSoftMeter-IOS.framework/Headers/SoftMeter-C-Api.h"
#import "AppDelegate.h"

@interface AppDelegate ()


@implementation AppDelegate

//      Replace "1234-1" with your Google Analytics property !
const char *gaPropertyID = "UA-1234-1";
//      Replace these strings with your app's information
const char *appName = "SoftMeter IOS demo";
const char *appVer = "0.9.0";
const char *appLicense = "demo";
const char *appEdition = "IOS app";

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    // Override point for customization after application launch.
    // Instead of "true", get the actual consent from the app settings.
    const bool userGaveConsent = true;
    // call the start() function to initialize the SoftMeter library
    start(appName, appVer, appLicense, appEdition, gaPropertyID, userGaveConsent);
    // after start() you can send any number and any type of hits to Google Analytics
    sendPageview("IOS launching", "IOS launching");
    return YES;

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.

The above code will initialize the SoftMeter library (by calling the "start" function) and also free the library (by calling the "stop" function).

It will also send a "Launching" pageView hit to your Google Analytics property.

That's it!

Just by adding this simple code in your IOS app, you will be able to see in your Google Analytics account important figures like:

  • how many users launch your app per day/month/year,
  • how often they use it,
  • how many new users you have,
  • their operating system versions and screen resolutions,
  • their countries,
  • their computer's preferred language, and
  • many more.

If you want to see detailed usage patterns of your IOS app

Starting from the example above, you can easily go further and put within your IOS app more calls to the SoftMeter's functions.

Logging the important user clicks to Google analytics will allow you to:

  • see how users navigate inside your app from one screen to another,
  • understand how they use your software,
  • discover which features are used the most or the least,
  • know how many of them go to the "Register" screen but do not go further to complete the payment
  • log exceptions and app crashes remotely.

In the following example, you can see how you can send an event hit whenever the user clicks a specific button.
(full example here)

#include "../../../bin/libSoftMeter-IOS.framework/Headers/SoftMeter-C-Api.h"
#import "ViewController.h"

// The file extension of this source file must be .mm so that it is compiled as Obj-C++

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIButton *btnExit;
@property (weak, nonatomic) IBOutlet UIButton *btnPressMe;


@implementation ViewController

- (IBAction)onPress_ButtonPressMe:(id)sender
    sendEvent("IOS event", "Button pressed", 0);

Using a one-line code like the above you can send to Google analytics any of the four Google hit types:

  • pageViews
  • screenViews
  • events
  • exceptions/crashes

How SoftMeter works with Google Analytics

SoftMeter has Google Analytics as the reporting platform. It works in the same way as in the case of website statistics.

app analytics via google analytics

You can read more here.

How to proceed with SoftMeter

Visit the SoftMeter's home page and start listening to your app's "heartbeat".

Add new comment