updated protocol detection in google analytics script
fixing trailing whitespace issues
updated reference output