Set up per page JS loading and inject analytics on production environment only