add statistic js code