const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
submissionId: '<string>',
eventType: '<string>',
fingerprint: '<string>',
mediumId: '<string>',
medium: '<string>',
name: '<string>',
slideName: '<string>',
isResultPageSet: 123,
locationId: '<string>',
timeSpent: 123,
endTimestamp: 123,
firstContentfulPaint: 123,
startTimestamp: 123,
timeToInteractive: 123,
totalBlockingTime: 123,
fieldId: '<string>',
firstFocusAt: 123,
focusedFieldId: '<string>',
focusedFieldType: '<string>',
formLoadDuration: 123,
focusedLoadDuration: 123,
networkType: '<string>',
pageSizeKB: 123,
cacheStatus: '<string>',
cdnStatus: '<string>'
})
};
fetch('https://services.leadconnectorhq.com/forms/form-survey-event', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));