Hi,
You have so many errors on your website that I would suggest to fix those first. I don’t have the time to do it for you.
The error above is not related to my plugin, because it works well on other websites.
To find out where the error is exactly maybe you can put the uncompressed version of ga4wpjs.js in place.
TrackingLogTime(a) {
return a[0] == 50 ? (parseInt(a[1]) + 1) + ":00" : (a[1] || "0") + ":" + (parseInt(a[0]) + 10)
}
function stInitializeControlVars() {
if (typeof window.trackScrolling == "undefined") {
window.trackScrolling = window.stFailbackDefaults.trackScrolling
}
if (typeof window.stLogInterval == "undefined") {
window.stLogInterval = window.stFailbackDefaults.stLogInterval * 1000
}
if (typeof window.docTitle == "undefined") {
window.docTitle = window.stFailbackDefaults.docTitle
}
if (typeof window.cutOffTime == "undefined") {
window.cutOffTime = window.stFailbackDefaults.cutOffTime
}
if (typeof window.trackNoEvents == "undefined") {
window.trackNoEvents = window.stFailbackDefaults.trackNoEvents
}
if (typeof window.trackNoMaxTime == "undefined") {
window.trackNoMaxTime = window.stFailbackDefaults.trackNoMaxTime
}
if (window.trackScrolling === true) {
setTimeout(function() {
window.onscroll = function() {
window.onscroll = null;
gaplus("send", "event", "Scroll", window.docTitle, "scrolled")
}
}, 2000)
}
}
if (window.trackNoEvents === false) {
function startTimeTracking(a) {
stInitializeControlVars();
window.stIntervalObj = window.setInterval(function() {
total_time += 10;
if (window.trackNoMaxTime === true) {
total_time = 1
}
if (window.total_time <= window.cutOffTime) {
a = TrackingLogTime(a.split(":").reverse());
gaplusu("send", "event", "Time", "Log", a)
} else {
window.clearInterval(window.stIntervalObj)
}
}, (window.stLogInterval))
}
jQuery(document).ready(function() {
startTimeTracking("00")
})
};