bugfix on environment check and gioogle analytics
merged