From: Vincent Vanwaelscappel Date: Wed, 22 Dec 2021 13:35:25 +0000 (+0100) Subject: wip #4978 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0baa09c082195b2547f42d7a242935d61b925cf3;p=fluidbook-html5.git wip #4978 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.stats.js b/js/libs/fluidbook/fluidbook.stats.js index fc0390c7..a7f11001 100644 --- a/js/libs/fluidbook/fluidbook.stats.js +++ b/js/libs/fluidbook/fluidbook.stats.js @@ -117,12 +117,24 @@ FluidbookStats.prototype = { } if (this.fluidbook.settings.stats) { - this.trackFluidbook(type, page, extra); + try { + this.trackFluidbook(type, page, extra); + } catch (e) { + + } } if (this.fluidbook.settings.statsMatomo) { - this.trackMatomo(type, page, extra); + try { + this.trackMatomo(type, page, extra); + } catch (e) { + + } + } + try { + this.trackGoogleAnalytics(type, page, extra); + } catch (e) { + } - this.trackGoogleAnalytics(type, page, extra); }, checkGoogleAnalytics: function () { @@ -153,7 +165,7 @@ FluidbookStats.prototype = { } switch (type) { case 0: // Change page - window._paq.push(['setCustomUrl', '/page/'+page]); + window._paq.push(['setCustomUrl', '/page/' + page]); window._paq.push(['trackPageView']); break; case 10: // Open Book