]> _ Git - cubist_gtag.git/commitdiff
try #3065
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Sep 2019 17:11:22 +0000 (19:11 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Sep 2019 17:11:22 +0000 (19:11 +0200)
resources/public/js/gtag.js

index f3712e3b939a59bc8b00b5001416781ee8317d18..2d33eae579759dae7ac966d282312abf6abccd5f 100644 (file)
@@ -43,7 +43,7 @@ cubistga.prototype.event = function (action, category, label, value, noninteract
     if (noninteraction === undefined) {
         noninteraction = false;
     }
-    if (options === undefined) {
+    if (options === undefined || options === null) {
         options = {};
     }
     options.non_interaction = noninteraction;
@@ -56,7 +56,6 @@ cubistga.prototype.event = function (action, category, label, value, noninteract
     if (undefined !== value && null !== value) {
         options.value = value;
     }
-    console.log('gtag event', action, options);
     return gtag('event', action, options)
 };