Auto-tracked - App Lifecycle iOS


Rolling our our app and SDK and I found something strange in our SDK for iOS, application foreground, background and installs are wildly inflated. As you can see below in the hundreds of millions for foreground/background.

Screenshot 2023-11-23 at 13.59.37

Android on the other-hand looks and feels correct given the screen_views and events.

Does anyone have a theory why the auto-tracked events for iOS would be so much inflated?


Hi @kfitzpatrick,

This looks very strange. A few questions about it:

  • is the data deduplicated? are these unique events (with different event IDs)?
  • why do you see less screen view events on iOS compared to install events? is it possible that you are not tracking some screen views?
  • to analyze this deeper:
    • deduplicate the data if not already deduplicated (it’s also a problem if these are duplicate events, just want to understand where the problem is coming from)
    • could you extract unique device counts by the event names? you could use the userId identifier in the client_session context entity. this could tell us if we are missing data from some devices in the other events (install, screen view)
    • extract the unique session counts by the event names. you could use the sessionId in the client_session context entity. this could tell us if multiple background/foreground events are tracked for the same background/foreground change.

Thanks for responding @matus

I didn’t dedup, this is raw native atomic, with iOS background/foreground I get around 5-7% duplicate. The other events do have duplicates too but in around 2% which has been my experience pre-modelling.

True, not all “screens” are exclusively tracked, on both iOS and Andr a user would be presented with date and time from and to as part of search that would be tracked in an event but not a screen_view event.

I don’t sessionize due to being an SDK, creates third party issues to the parent app.

The new counts:

Thanks @kfitzpatrick for the extra info!

I have to admit, that does look suspicious. The ratio of the number of background/foreground events to the number of users is much higher on iOS compared to Android – so there are many more background/foreground events produced per user. Also the ratio of background/foreground events to install events.

Although the 5-7% duplicates are quite high, they don’t quite explain the inflated number of background events on iOS. These seem not to be duplicates (at least they have different event IDs).

Too bad that we can’t explore the data by sessions. My next question would be to explore whether you see multiple background events for the same app transition to background (not complete duplicates but two or more background events tracked right after each other). This might be possible to explore by sampling the data for a few users and inspecting the dvce_created_tstamp – are they close to each other? Are there foreground events in between subsequent background events?

One more question from my side is which version of the iOS/Android trackers are you using?