Added Medium and Moved Event Tracking to JS File