]> _ Git - fluidbook-html5.git/commitdiff
wip #4978 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Dec 2021 13:35:25 +0000 (14:35 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Dec 2021 13:35:25 +0000 (14:35 +0100)
js/libs/fluidbook/fluidbook.stats.js

index fc0390c7536e020d3d4b45646e490552528795a0..a7f11001bb5425a3faafb8be1083d07f7ea3ba2c 100644 (file)
@@ -117,12 +117,24 @@ FluidbookStats.prototype = {
         }\r
 \r
         if (this.fluidbook.settings.stats) {\r
-            this.trackFluidbook(type, page, extra);\r
+            try {\r
+                this.trackFluidbook(type, page, extra);\r
+            } catch (e) {\r
+\r
+            }\r
         }\r
         if (this.fluidbook.settings.statsMatomo) {\r
-            this.trackMatomo(type, page, extra);\r
+            try {\r
+                this.trackMatomo(type, page, extra);\r
+            } catch (e) {\r
+\r
+            }\r
+        }\r
+        try {\r
+            this.trackGoogleAnalytics(type, page, extra);\r
+        } catch (e) {\r
+\r
         }\r
-        this.trackGoogleAnalytics(type, page, extra);\r
     },\r
 \r
     checkGoogleAnalytics: function () {\r
@@ -153,7 +165,7 @@ FluidbookStats.prototype = {
         }\r
         switch (type) {\r
             case 0: // Change page\r
-                window._paq.push(['setCustomUrl', '/page/'+page]);\r
+                window._paq.push(['setCustomUrl', '/page/' + page]);\r
                 window._paq.push(['trackPageView']);\r
                 break;\r
             case 10: // Open Book\r