Add segment.io analytics support and initial instrumentation
Convert tabs to spaces