Solved

Changing the session_id Manually

  • 22 March 2022
  • 2 replies
  • 497 views

Badge

Hey folks,

I am not able to set the session_id manually using the js sdk. Is there any way where i can change the session id.

icon

Best answer by SheenaGreen 22 March 2022, 16:40

View original

2 replies

Userlevel 4
Badge +8

I use this command to manually set session ID when I’m doing testing… maybe it helps for your use case as well. Replace 123456789 with the session ID you want to use. 

amplitude.getInstance().setSessionId(123456789);

 

Badge

Yeah it worked, i was passing the session_id as a string earlier now i passed it as an integer to the setSessionId() method. Thanks for your help @SheenaGreen  

Reply