makes urls for api calls relative
adds google analytics code