added server-side analytics with segement.io.