diff --git a/js/dist/forum.js b/js/dist/forum.js index 1b18067..762c1cf 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var a in t)e.o(t,a)&&!e.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:t[a]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o);const t=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/app"];var n=e.n(a);const r=flarum.core.compat["common/components/Page"];var g=e.n(r);n().initializers.add("fof-analytics",(function(){setTimeout((function(){n().data.googleTrackingCode&&"undefined"!=typeof gtag&&n().session.user&>ag("config",n().data.googleTrackingCode,{user_id:n().session.user.id()})}),0),(0,t.extend)(g().prototype,"oninit",(function(){n().data.googleTrackingCode&&!n().data.googleTrackingCode.startsWith("G-")&&"undefined"!=typeof gtag&>ag("config",n().data.googleTrackingCode,{page_path:m.route.get()}),n().data.googleGTMCode&&"undefined"!=typeof gtagpush&>agpush({event:"custom_event",virtualpath:m.route.get()}),"undefined"!=typeof _paq&&(_paq.push(["setCustomUrl",m.route.get()]),_paq.push(["trackPageView"]))}))}))})(),module.exports=o})(); +(()=>{var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var a in t)e.o(t,a)&&!e.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:t[a]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o);const t=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/app"];var n=e.n(a);const r=flarum.core.compat["common/components/Page"];var g=e.n(r);n().initializers.add("fof-analytics",(function(){setTimeout((function(){n().data.googleTrackingCode&&"undefined"!=typeof gtag&&(gtag("config",n().data.googleTrackingCode),n().session.user&>ag("config",n().data.googleTrackingCode,{user_id:n().session.user.id()}))}),0),(0,t.extend)(g().prototype,"oninit",(function(){n().data.googleTrackingCode&&!n().data.googleTrackingCode.startsWith("G-")&&"undefined"!=typeof gtag&>ag("config",n().data.googleTrackingCode,{page_path:m.route.get()}),n().data.googleGTMCode&&"undefined"!=typeof gtagpush&>agpush({event:"custom_event",virtualpath:m.route.get()}),"undefined"!=typeof _paq&&(_paq.push(["setCustomUrl",m.route.get()]),_paq.push(["trackPageView"]))}))}))})(),module.exports=o})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 5b07895..b897b4a 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,0B,aCIxDC,IAAAA,aAAAA,IAAqB,iBAAiB,WAEpCC,YAAW,WACLD,IAAAA,KAAAA,oBAA+C,oBAATE,MAAwBF,IAAAA,QAAAA,MAChEE,KAAK,SAAUF,IAAAA,KAAAA,mBAA6B,CAC1CG,QAASH,IAAAA,QAAAA,KAAAA,MAGd,GAAE,IAEHI,EAAAA,EAAAA,QAAOC,IAAAA,UAAgB,UAAU,WAG3BL,IAAAA,KAAAA,qBAAgCA,IAAAA,KAAAA,mBAAAA,WAAuC,OAAyB,oBAATE,MACzFA,KAAK,SAAUF,IAAAA,KAAAA,mBAA6B,CAC1CM,UAAWC,EAAEC,MAAMpB,QAInBY,IAAAA,KAAAA,eAA8C,oBAAbS,UACnCA,SAAS,CACPC,MAAO,eACPC,YAAaJ,EAAEC,MAAMpB,QAIL,oBAATwB,OACTA,KAAKC,KAAK,CAAC,eAAgBN,EAAEC,MAAMpB,QACnCwB,KAAKC,KAAK,CAAC,kBAEd,GACF,G","sources":["webpack://@fof/analytics/webpack/bootstrap","webpack://@fof/analytics/webpack/runtime/compat get default export","webpack://@fof/analytics/webpack/runtime/define property getters","webpack://@fof/analytics/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/analytics/webpack/runtime/make namespace object","webpack://@fof/analytics/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/analytics/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/analytics/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/analytics/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\napp.initializers.add('fof-analytics', () => {\n // Supply user IDs for cross-device tracking\n setTimeout(() => {\n if (app.data.googleTrackingCode && typeof gtag !== 'undefined' && app.session.user) {\n gtag('config', app.data.googleTrackingCode, {\n user_id: app.session.user.id(),\n });\n }\n }, 0);\n\n extend(Page.prototype, 'oninit', function () {\n // Don't run this if tracking code starts with \"G-...\"\n // GA4 automatically tracks history changes for SPAs with `page_view` events under the `page_location` property\n if (app.data.googleTrackingCode && !app.data.googleTrackingCode.startsWith('G-') && typeof gtag !== 'undefined') {\n gtag('config', app.data.googleTrackingCode, {\n page_path: m.route.get(),\n });\n }\n\n if (app.data.googleGTMCode && typeof gtagpush !== 'undefined') {\n gtagpush({\n event: 'custom_event',\n virtualpath: m.route.get(),\n });\n }\n\n if (typeof _paq !== 'undefined') {\n _paq.push(['setCustomUrl', m.route.get()]);\n _paq.push(['trackPageView']);\n }\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","setTimeout","gtag","user_id","extend","Page","page_path","m","route","gtagpush","event","virtualpath","_paq","push"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,0B,aCIxDC,IAAAA,aAAAA,IAAqB,iBAAiB,WAEpCC,YAAW,WACLD,IAAAA,KAAAA,oBAA+C,oBAATE,OACxCA,KAAK,SAAUF,IAAAA,KAAAA,oBAEXA,IAAAA,QAAAA,MACFE,KAAK,SAAUF,IAAAA,KAAAA,mBAA6B,CAC1CG,QAASH,IAAAA,QAAAA,KAAAA,OAIhB,GAAE,IAEHI,EAAAA,EAAAA,QAAOC,IAAAA,UAAgB,UAAU,WAG3BL,IAAAA,KAAAA,qBAAgCA,IAAAA,KAAAA,mBAAAA,WAAuC,OAAyB,oBAATE,MACzFA,KAAK,SAAUF,IAAAA,KAAAA,mBAA6B,CAC1CM,UAAWC,EAAEC,MAAMpB,QAInBY,IAAAA,KAAAA,eAA8C,oBAAbS,UACnCA,SAAS,CACPC,MAAO,eACPC,YAAaJ,EAAEC,MAAMpB,QAIL,oBAATwB,OACTA,KAAKC,KAAK,CAAC,eAAgBN,EAAEC,MAAMpB,QACnCwB,KAAKC,KAAK,CAAC,kBAEd,GACF,G","sources":["webpack://@fof/analytics/webpack/bootstrap","webpack://@fof/analytics/webpack/runtime/compat get default export","webpack://@fof/analytics/webpack/runtime/define property getters","webpack://@fof/analytics/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/analytics/webpack/runtime/make namespace object","webpack://@fof/analytics/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/analytics/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/analytics/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/analytics/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\napp.initializers.add('fof-analytics', () => {\n // Supply user IDs for cross-device tracking\n setTimeout(() => {\n if (app.data.googleTrackingCode && typeof gtag !== 'undefined') {\n gtag('config', app.data.googleTrackingCode);\n\n if (app.session.user) {\n gtag('config', app.data.googleTrackingCode, {\n user_id: app.session.user.id(),\n });\n }\n }\n }, 0);\n\n extend(Page.prototype, 'oninit', function () {\n // Don't run this if tracking code starts with \"G-...\"\n // GA4 automatically tracks history changes for SPAs with `page_view` events under the `page_location` property\n if (app.data.googleTrackingCode && !app.data.googleTrackingCode.startsWith('G-') && typeof gtag !== 'undefined') {\n gtag('config', app.data.googleTrackingCode, {\n page_path: m.route.get(),\n });\n }\n\n if (app.data.googleGTMCode && typeof gtagpush !== 'undefined') {\n gtagpush({\n event: 'custom_event',\n virtualpath: m.route.get(),\n });\n }\n\n if (typeof _paq !== 'undefined') {\n _paq.push(['setCustomUrl', m.route.get()]);\n _paq.push(['trackPageView']);\n }\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","setTimeout","gtag","user_id","extend","Page","page_path","m","route","gtagpush","event","virtualpath","_paq","push"],"sourceRoot":""} \ No newline at end of file