* 'master' of https://github.com/usefathom/fathom:
  remove tracking image after it finished loading
This commit is contained in:
Danny van Kooten 2018-10-10 10:28:13 +02:00
commit e82e363613
1 changed files with 1 additions and 1 deletions

View File

@ -172,8 +172,8 @@ function trackPageview() {
data.lastSeen = +new Date(); data.lastSeen = +new Date();
setCookie('_fathom', JSON.stringify(data), { expires: midnight, path: '/' }); setCookie('_fathom', JSON.stringify(data), { expires: midnight, path: '/' });
}); });
i.addEventListener('load', () => document.body.removeChild(i));
document.body.appendChild(i); document.body.appendChild(i);
window.setTimeout(() => { document.body.removeChild(i)}, 1000);
} }
// override global fathom object // override global fathom object