Fix Javascript Loading and analytics