Added segment.io analytics code