la-haus / flutter-segment

Segment.io library for flutter
MIT License
22 stars 138 forks source link

Amplitude session id always -1 #45

Open henriblancke opened 2 years ago

henriblancke commented 2 years ago

I've not been able to get session ids working for Amplitude on both iOS and Android. Session IDs keep defaulting to -1. This is with amplitudeIntegrationEnabled enabled and for both per event and system default method:

# The per event method
Segment.screen(
  screenName: screenName,
  properties: {},
  options: {
    'integrations': {
      'Amplitude': {'session_id': '1578083527'}
    }
  },
)

# System default method
SegmentDefaultOptions.instance.options = {
  'integrations': {
    'Amplitude': {
      'session_id': '1578083527'
    }
  }
}

I've tried passing in the example value 1578083527 as session id, as well as a second and a millisecond unix epoch, none seem to propagate to Amplitude.

Anything I am missing or a configuration step I'm overlooking? Thank you for your help!