mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
2 lines
755 B
JavaScript
2 lines
755 B
JavaScript
this.D=this.D||{},this.D.GA=function(){"use strict";function o(){var o=document.createElement("script");o.async=!0,o.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(o)}function i(i){window.ga||(o(),window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=Number(new Date),window.ga("create",i,"auto"))}function n(){i(window.$docsify.ga),window.ga("set","page",location.href),window.ga("send","pageview")}var w=function(){return window.Docsify&&window.Docsify.installed?window.$docsify.ga?(n(),void(window.$docsify.plugins=[].concat(window.$docsify.plugins,n))):void console.error("[Docsify] ga is required."):void console.error("[Docsify] Please load docsify.js first.")},s=w();return s}();
|