add support for querying by page views and dom events when using JavaScript API