Skip to main content
Solved

How to track the start and end of a user session

  • July 12, 2023
  • 1 reply
  • 740 views

How to configure my app such that when a user session starts or ends an event is sent or recorded. Right now, I have initialized my aplitude using amplitude.getInstance().init().

Best answer by Saish Redkar

Hi @Shivani1999 

If you are using any of the SDKs, then Amplitude can track the Start Session and End Session events using the beginning and ending times of each session by session ID.

You can easily turn on tracking for these events by adding the following lines of code before initializing the SDK:

 

More on this here . Hope this helps.

View original
Did this topic help you find an answer to your question?

1 reply

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • Answer
  • July 12, 2023

Hi @Shivani1999 

If you are using any of the SDKs, then Amplitude can track the Start Session and End Session events using the beginning and ending times of each session by session ID.

You can easily turn on tracking for these events by adding the following lines of code before initializing the SDK:

 

More on this here . Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings