Kumar, Anish

mPulse Review Guidelines for iOS

Once you have completed integrating mPulse SDK, it's time to check if the integration is done properly. This document gives you a procedure to follow, to make sure your code and settings are configured correctly, and that you’re getting the expected results.



In this guide you’ll learn how to verify the following;

  • Network Monitoring

  • Action Beacons

  • Custom Metrics

  • Custom Timers

  • View Groups

  • Custom Dimensions


2. Network Monitoring

All network calls which are using NSURLSession and NSURLConnection are instrumented by the mPulse SDK, only CFNetwork is not instrumented. For third party frameworks you need to write network wrappers around NSURLSessionConfiguration.

NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration];
[[AkaCommon shared] interceptSessionsWithConfiguration:sessionConfig];

Pass the sessionConfig object created in above example to the frameworks.

Example for AFNetworking:

NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration];
[[AkaCommon shared] interceptSessionsWithConfiguration:sessionConfig];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:sessionConfig];


To verify if network is being instrumented, check the Xcode Logs:

Network Beacons

Build version of mPulse - Identifies the build version of mPulse framework

mPulse Mobile Build: 20.32.1


Config: If mPulse is configured properly, config will be received as seen in this example: 


You can check the config on your browser and see the configs added to your app.


Beacons sent: How many beacons were sent to server.

Successfully sent 2 beacon(s) to the server.


Next, open Soasta portal - https://mpulse.soasta.com/concerto/Central and click on Summary


Choose an app from the DropDown as shown below and choose the time as Last 1 hour or 3 hours depending on your requirement.


mPulse sends requests every 60 seconds, you can see the spikes for the network calls as shown below. In the image it shows the number of Page Views and Page Load time for the  network request.




You will also be able to some more details about the requests;




  1. Check the API key is added in the info.plist 

  1. Check if you are able to receive config from mPulse as explained above in Config. 

  2. Make sure wrappers are added for third party sdk for network and image requests.

3. Action Beacons

The mPulse iOS SDK allows you to monitor Actions, which are distinct user interactions. Actions can be started at any time by calling startAction and can be stopped by either calling stopAction or by having the SDK automatically stop the Action once all network activity has finished.

Action beacons helps in cutting down cost of beacons as all the beacons will be bundled under an action, you need to call startAction and stopAction. Network, custom metrics, timers can be called under an action.


Step 1: Add Start and Stop actions in code:

[[MPulse sharedInstance] startAction];
//Network calls
[[MPulse sharedInstance] stopAction];


Step 2: Open Waterfall report and check the Beacon details



  1. Make sure stopAction is called when you have finalised your network requests or the ViewController is popped.

4. Metrics 

Step 1 - Add Metrics in the App Config on the Soasta portal:

Pic 8

In the above figure, Metrics is added as Revenue and currency as USD, Percent Decimal Places is set to 2 and Currency Decimal Places is set to 2.


Step 2: Add in your code:

Note we have added 2 decimal places, so 1000 will be represented as $10.00.

[[MPulse sharedInstance] sendMetric:@"M_Splashscreen" value:[NSNumber numberWithInt:1000]];


Step 3: See on the portal:

Pic 9

Troubleshooting :

  • Make sure you have added Metrics in the App Config of the Soasta portal.

  • Make sure the name that you have added for the metrics(portal) and the name that you are sending from the sendMetric() both are same.

Eg : In Portal Added Metrics name : M_SplashScreen.

       From App :

[[MPulse sharedInstance] sendMetric:@"M_Splashscreen" value:[NSNumber numberWithInt:1000]];

  • Note that you may also need to select the custom metric that you want to show in summary, which can be done via settings which is located to the top right corner in the summary section.

5. Custom Timers

Step 1 - Add Timers in the App Config on the Soasta portal:


Step 2: Add a timer to code:

NSString *timerID = [[MPulse sharedInstance] startTimer:@"SampleTimer"];
//Network calls
[[MPulse sharedInstance] stopTimer:timerID];


Step 3: Select a timer from DropDown:


Step 4: Check the report:


Troubleshooting :

  • Make sure you have added Timers in the App Config of the Soasta portal.

  • Make sure the name that you have added for the Timers(portal) and the name that you are sending from the startTimer, are the same.

Eg : In Portal Added Timer name : SampleTimer.

       From App :

NSString *timerID = [[MPulse sharedInstance] startTimer:@"SampleTimer"];

[[MPulse sharedInstance] stopTimer:timerID];


6. View Groups

You may want to segrate reports based on view. Once set, the View Group will be associated with every subsequent beacon.

Step 1: Add View Group when your view loads or based on your logic.

[[MPulse sharedInstance] setViewGroup:@"HomeViewGroup"];


Step 2: Select Group name from drop down. Upon selecting a Group, report will show only network calls associated with that Group.



7. Custom Dimensions

You may want to add a dimension to your data. Example, you may want to filter out customers who are Gold or Silver user.


Step 1: Add dimension when the app loads in didFinishLaunchingWithOptions or based on your logic.

[[MPulse sharedInstance] setDimension:(@"CardType") value:@"Gold"];


Step 2: Select type based on Dimension set in above code. Here Dimension is set as CardType and value is set to Gold.