I've been battling this for a little while and I'm a bit lost as to where to go to fix this. Moosend cannot help.
I'm following their article: https://help.moosend.com/hc/en-us/articles/4413852278162
I've de-minified the code, however wordpress still claims the following:
Your PHP code changes were rolled back due to an error on line 65 of file wp-content/themes/medigreen/header.php. Please fix and try saving again.
syntax error, unexpected token ",", expecting variable
I've got enough experience to classify myself as an intermediate JS developer, but I don't see anything wrong with the code block.
!(function (t, n, e, o, a) {
function d(t) {
var n = ~~(Date.now() / 3e5),
o = document.createElement(e);
(o.async = !0), (o.src = t + "?ts=" + n);
var a = document.getElementsByTagName(e)[0];
a.parentNode.insertBefore(o, a);
}
(t.MooTrackerObject = a),
(t[a] =
t[a] ||
function () {
return t[a].q ? void t[a].q.push(arguments) : void (t[a].q = [arguments]);
}),
window.attachEvent ? window.attachEvent("onload", d.bind(this, o)) : window.addEventListener("load", d.bind(this, o), !1);
})(window, document, "script", "//cdn.stat-track.com/statics/moosend-tracking.min.js", "mootrack");