Fix safari and add analytics