Fix some mixpanel events

- Upgrade event is thrown when the recently_upgraded message is shown
- Import event is thrown before redirecting (although it might not
  work.. let's see)