From c7a55e5b8f51af23bbc56192bf484e13350e8d7d Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sat, 8 Dec 2018 06:10:50 +0000 Subject: [PATCH] Try gtag instead --- passmate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/passmate.js b/passmate.js index 799ac72..5e595e4 100644 --- a/passmate.js +++ b/passmate.js @@ -109,8 +109,10 @@ class PassMate { let print = this.addElement('button', printStep, 'Click here to print the book!'); print.style.cursor = 'pointer'; printStep.addEventListener('click', () => { - let ga = window.ga || (() => {}); - ga('send', 'event', 'Overview', 'print'); + let gtag = window.gtag || (() => {}); + gtag('event', 'print', { + 'event_category': 'Overview', + }); window.print(); });