Fix bug with time parameter in track

When setting a time for a track event, set the parameter before
converting to base64 encoded string.