created GA event functions
refactored to allow GA to be accessed by app