add analytics code
replace JS('var stuff') with var(stuff)