updated analytics script