modified analytics script