fix error in analytics code, add gravatar code but not using yet