Switched analytics code to use url