Migrate to gtag.js

This commit is contained in:
Gabriele Cirulli
2018-11-04 11:12:06 +01:00
parent bacc1519aa
commit 487ad74026
5 changed files with 34 additions and 28 deletions
+5 -1
View File
@@ -12,7 +12,11 @@ window.requestAnimationFrame(function () {
noticeClose.addEventListener("click", function () {
notice.parentNode.removeChild(notice);
storage.setNoticeClosed(true);
ga("send", "event", "notice", "closed");
if (typeof gtag !== undefined){
gtag("event", "closed", {
event_category: "notice",
});
}
});
}
});