Skip to content

Instantly share code, notes, and snippets.

@dpuscher
Created February 16, 2019 19:10
Show Gist options
  • Save dpuscher/bba3b1ae998f2664ddbe43334a50f045 to your computer and use it in GitHub Desktop.
Save dpuscher/bba3b1ae998f2664ddbe43334a50f045 to your computer and use it in GitHub Desktop.
async version of INFOnline tracking script
(function () {
var iomCalls = [];
window.iomAsync = {
c: function() {
iomCalls.push(arguments);
}
};
var script = document.createElement("script");
script.onload = function () {
iomCalls.forEach(function (iomCall) {
window.iom.c.apply(null, iomCall);
});
window.iomAsync = window.iom;
};
script.async = true;
script.src = "https://script.ioam.de/iam.js?m=1";
document.head.appendChild(script);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment