added analytics script and changed metadata download