Solved

Server side event has no session

  • 1 November 2021
  • 3 replies
  • 257 views

Userlevel 1
Badge +2

Hi, All!

I'm asking the question aaaaaagain!!!

we have some server side event in my website, but this event have no session, so we can’t associate him with the current conversation. How did everyone solve this problem???

 

icon

Best answer by Yuanyuan Zhang 2 November 2021, 11:29

View original

3 replies

Userlevel 5
Badge +3

You’d need to send these events with the proper Session ID as well. So you have two options:

  1. Tell your server which Session ID to use.
  2. Instead of sending these events from the server, send the appropriate information to your app and have it send the event.

#2 sounds more feasible to me, but without knowing your systems, it’s difficult to know for sure.

Userlevel 1
Badge +2

@MikkoKarvonen 

Hi, Mikko,  we use segment send data to amplitude. and the product is web.

Userlevel 5
Badge +5

Hi @xiaomeng.zhang

This is Yuanyuan from the Amplitude Support team - happy to help!

@MikkoKarvonen  is absolutely right about telling your server which Session ID to use. 

Segment does not provide session-tracking by default. As you are using our server-side integration with Segment, you will have to pass in the sessionId for your server-side calls from Segment to Amplitude:

https://segment.com/docs/integrations/amplitude/#sessionid

Hope this helps, and let me know if you have any other questions!

Best,

Yuanyuan

Reply