Hi all, we are using Tracked Events in our targeting logic. The event count is manually incremented using
window._qsie = window._qsie || [];window._qsie.push('eventName');
Is there any way to reset the count to zero using the window functions?
Relevant docs: https://www.qualtrics.com/support/website-app-feedback/intercepts-tab/edit-intercept-section/action-set-options/adding-event-tracking-triggering/#AdvancedEventTracking
Page 1 / 1
Before loading the intercept
const eventName = "testevent"
function getCookie(cName) {
const name = cName + "=";
const cDecoded = decodeURIComponent(document.cookie); //to be careful
const cArr = cDecoded .split('; ');
let res;
cArr.forEach(val => {
if (val.indexOf(name) === 0) res = val.substring(name.length);
})
return res;
}
function setCookie(cName, cValue, expDays) {
let date = new Date();
date.setTime(date.getTime() + (expDays * 24 * 60 * 60 * 1000));
const expires = "expires=" + date.toUTCString();
document.cookie = cName + "=" + cValue + "; " + expires + "; path=/";
}
let QSI_CT = JSON.parse(getCookie("QSI_CT"))
QSI_CT)eventName]=0
setCookie("QSI_CT",JSON.stringify(QSI_CT),30)
After loading the intercept
const eventName = "testevent"
window.QSI.EventTracker.countsneventName] = 0
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.