show page views when using JavaScript API