update js for data-collection sample