added funtion to incorporate google analytics