Solved

Set SessionId from Segment cannot be used again

  • 4 October 2021
  • 5 replies
  • 51 views

Badge

Until the last time, my team were able to sent sessionId from Segment to amplitude, this is the raw data

{
"$insert_id": "f7bfb4e0-0ab9-4860-af4c-6be89409a827",
"$insert_key": null,
"$schema": 12,
"_time": 1631864263470,
"adid": null,
"amplitude_attribution_ids": [
"2ec0c541748d9d7a0ff71b4e1e25c705"
],
"amplitude_event_type": null,
"amplitude_id": 299205766988,
"app": 330222,
"city": null,
"client_event_time": "2021-09-17 07:37:43.470000",
"client_upload_time": "2021-09-17 07:37:49.919000",
"country": null,
"data": {
},
"device_brand": null,
"device_carrier": "From Unity Editor",
"device_family": "Predator PH315-52 (Acer)",
"device_id": "PRASHANT-DEVICE-ID-TEST-0003",
"device_manufacturer": null,
"device_model": "Predator PH315-52 (Acer)",
"device_type": null,
"display_name": "OpenScreen",
"dma": null,
"event_id": 149928614,
"event_properties": {
"Spatie\\EventSourcing\\StoredEvents\\ShouldBeStoredmetaData": [
],
"activity_type": "OPEN_SCREEN",
"is_admin": "No",
"payload": "{\"distinct_id\":\"PRASHANT-DEVICE-ID-TEST-0003\",\"session_id\":\"1631889422\",\"os_name\":\"Windows\",\"os_version\":\"Windows 10 (10.0.22000) 64bit\",\"network\":\"From Unity Editor\",\"device_type\":\"Predator PH315-52 (Acer)\",\"app_version\":\"202109130\",\"ip\":\"192.168.1.219\"}",
"screen_name": "VerifyRegistrationScreen",
"timestamp": "2021-09-17T07:37:42.000000Z",
"title": "Open Screen"
},
"event_time": "2021-09-17 07:37:43.470000",
"event_type": "OpenScreen",
"global_user_properties": {
},
"group_properties": {
},
"groups": {
},
"idfa": null,
"ip_address": "192.168.1.219",
"is_attribution_event": false,
"language": null,
"library": "segment",
"location_lat": null,
"location_lng": null,
"os": "Windows Windows 10 (10.0.22000) 64bit",
"os_name": "Windows",
"os_version": "Windows 10 (10.0.22000) 64bit",
"paying": null,
"platform": null,
"region": null,
"sample_rate": null,
"server_received_time": "2021-09-17 07:37:49.919000",
"server_upload_time": "2021-09-17 07:37:49.922000",
"session_id": -10460973600000,
"start_version": "202109130",
"timeline_hidden": false,
"user_creation_time": "2021-09-17 07:37:05.931000",
"user_id": null,
"user_properties": {
},
"uuid": "2905be88-178a-11ec-83c3-02ab3f787fdf",
"version_name": "202109130"
}

but somehow, i think there are changes in amplitude that the same payload now become out of session event like this

{
"$insert_id": "4dad7ec8-43c4-4c1f-8935-1162ee95ee21",
"$row_source": "realtime",
"$schema": 12,
"_time": 1633343337082,
"adid": null,
"amplitude_attribution_ids": [
"ef6df0e1e1968da81f16abbecc6ab519"
],
"amplitude_event_type": null,
"amplitude_id": 305129050826,
"app": 330222,
"city": null,
"client_event_time": "2021-10-04T10:28:57.082",
"client_upload_time": "2021-10-04T10:28:59.212",
"country": null,
"data": {
},
"device_brand": null,
"device_carrier": null,
"device_family": "RMX-29",
"device_id": "testing-0",
"device_manufacturer": null,
"device_model": "RMX-29",
"device_type": null,
"display_name": "OpenScreen",
"dma": null,
"event_id": 383005072,
"event_properties": {
"Spatie\\EventSourcing\\StoredEvents\\ShouldBeStoredmetaData": [
],
"activity_type": "OPEN_SCREEN",
"description": 2000,
"is_admin": "No",
"payload": "{\"distinct_id\":\"testing-0\",\"session_id\":\"1577871000\",\"os\":\"Android 9.0\",\"device_type\":\"RMX-29\",\"version\":\"23.0.0.1\"}",
"screen_name": "EditProfilePanel",
"timestamp": "2021-10-04T10:28:56.000000Z",
"title": "Open Screen"
},
"event_time": "2021-10-04T10:28:57.082",
"event_type": "OpenScreen",
"group_properties": {
},
"groups": {
},
"idfa": null,
"ip_address": null,
"is_attribution_event": false,
"language": null,
"library": "segment",
"location_lat": null,
"location_lng": null,
"os": "",
"os_name": null,
"os_version": null,
"paying": null,
"platform": null,
"region": null,
"sample_rate": null,
"server_received_time": "2021-10-04 10:28:59.212000",
"server_upload_time": "2021-10-04T10:28:59.218",
"session_id": -1,
"start_version": null,
"timeline_hidden": false,
"user_creation_time": "2021-10-04T10:16:59.594",
"user_id": null,
"user_properties": {
},
"uuid": "e3dbaa98-24fd-11ec-bafc-0229867f0fb5",
"version_name": null
}

 

why the sudden change and how to overcome or fix this issue? 

icon

Best answer by Denis Holmes 5 October 2021, 12:01

View original

5 replies

Userlevel 6
Badge +4

Not entirely sure about this, but looks like there has been some changes on how Segment is sending session ids recently.

Another community user was facing the same issue - 

 

@ning.chang  @Denis Holmes any idea what could be causing this?

Badge

@Saish Redkar i believe the issue same with this

all our event are set with session_id -1, using segment Amplitude (analytics) seems working fine, but it will require work to switch between destinations

Userlevel 4
Badge +2

Hi @jonathantyar ,

 

Did you follow the Amplitude guide to integrating with Segment? Here is another by segment. I would read the parts about tracking sessions in the first link. I would especially read this article from Segment themselves which shows how to add a session ID with the Amplitude integration. Can you read the above articles and let me know if you followed the steps in the integrations and setting the session ID and if you still have the issue? Thank you!

Badge

@Denis Holmes yes, it was working properly as i mentioned and given the example above, but since 1 week ago it become out of sessions for all our event

Userlevel 4
Badge +2

Hi @jonathantyar ,

 

In that case, would you be so kind as to contact Segment support and see if they changed anything? It is unusual that it worked but is not now. I do feel this might be a segment issue , rather than an Amplitude issue. However, I am going to PM you my work email so you can CC me into the thread with Segment if needs be!

 

Kind Regards,
Denis

 

Reply