Storing stats via JavaScript