This PR addresses https://github.com/segmentio/integration-amplitude/issues/9. Sometimes we will see events with platform = 'analytics-ruby', or 'analytics-php', and we expect values like 'iOS', 'Web', or 'Android'. Following suggestions from @f2prateek, we map the segment library to a platform, or fallback on the device / os. Also sometimes Segment's values are all lowercase (like device type), so I added another layer of sanitization to format the values.
This PR addresses https://github.com/segmentio/integration-amplitude/issues/9. Sometimes we will see events with platform = 'analytics-ruby', or 'analytics-php', and we expect values like 'iOS', 'Web', or 'Android'. Following suggestions from @f2prateek, we map the segment library to a platform, or fallback on the device / os. Also sometimes Segment's values are all lowercase (like device type), so I added another layer of sanitization to format the values.