Add analytics, fix mail-script