added environment check and gioogle analytics