Solved

Best practices for event triggering after app foreground

  • 17 February 2022
  • 2 replies
  • 41 views

Badge

Hi,

I have stumbled upon a question in my team regarding the firing of an event for a screen view at app foreground.

In general, should we track or not a screen view which happens at foreground since the action might not have been intentional?

Thanks!

 

icon

Best answer by belinda.chiu 19 February 2022, 01:58

View original

2 replies

Userlevel 7
Badge +10

Hey @BenR2 

I’m not fully well versed with the mobile app side of things, but if you are already using Amplitude's Android and iOS SDKs then you have the option of sending a start session and end session events.

As per Amplitude , “For mobile, a session begins when the app is brought into the foreground; it ends when the app goes into the background and no events are fired for at least five minutes.”

You can read more on how you can define your sessions in here and use those events as per your use case.

Here’s another post which dives into session counts -

 

Let me know if this helps.

 

Userlevel 5
Badge +4

Hi @BenR2 ! Welcome to the Amplitude Community and happy to help! :wave:

It is a fair question to ask on whether or not to track screen views at app foreground as it could have been not intentional and if that is the only event that the user does, you might get a lot of sessions with just 1 event which could skew your session count. 

To be transparent, there’s not really one way that Amplitude would suggest and it’s really up to the customer (you). That said, here are some guiding thoughts that we can provide: 

  • Is Screen View an event that you would want to track and is important to your analyses? 
  • If so, is there a way to still track Screen View events without tracking the one that happens upon foreground? 
  • If not, do you think that the case of it not being intentional happen often?  
  • If not sure, consider instrumenting Screen View event upon foreground and see how that goes for about a month. Then check Amplitude to see if you do see a lot of sessions with just one Screen View event. 
  • If you find that there’s a lot of sessions with just one Screen View event and there is a way to track Screen View events without tracking the one that happens upon foreground, adjust your instrumentation accordingly. 

Hope these guidelines help come to a decision with your team! 

Reply