updated for better support of Google Analytics