const url = 'https://api.sureshake.com/v2/reports/<id>/page-views';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({events: [{page: 1, ms: 1}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));