Skip to content

Instantly share code, notes, and snippets.

@nickjacob
Created January 19, 2016 21:12
Show Gist options
  • Save nickjacob/5ccdd5854538036c9f22 to your computer and use it in GitHub Desktop.
Save nickjacob/5ccdd5854538036c9f22 to your computer and use it in GitHub Desktop.
Quantcast - Manually trigger refresh
// load the quantcast quant.js
// replace w/ actual url
(function (s, h, src) {
window._qQue = window._qQue || [];
function _exec(fn){ fn(window.__qc); }
s.onload = function () {
window._qQue.forEach(_exec);
window._qQue.push = _exec;
};
s.src = src;
h.appendChild(s);
}(document.createElement('SCRIPT'), document.getElementsByTagName('HEAD')[0], 'quant.js');
function quantCast(_global, event) {
_global._qevents = _global._qevents || [];
// firePixels clears the queue
_global._qQue.push(function(qc){
qc.qcenqp(event);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment