Updated to use Google's Universal Analytics' methods