Home >Backend Development >PHP Tutorial >piwk multi-service statistics on one page

piwk multi-service statistics on one page

WBOY
WBOYOriginal
2016-08-08 09:21:171588browse
<code><span><script type='text/javascript' src='http://localhost/piwikpro/piwik.js'></script>
<<span>script</span><span>type</span>=<span>"text/javascript"</span>>
var _ums = _ums || [];
  _ums.push(['trackPageView']);
  _ums.push(['enableLinkTracking']);
  (function() {
    var u="//localhost/web/web/";
    _ums.push(['setTrackerUrl', u+'piwik.php']);
    _ums.push(['setSiteId', 6]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</span></code><pre class="brush:php;toolbar:false"><code><span><span>var</span> piwikTracker;</span></code>
window.piwikAsyncInit = function(){ try { piwikTracker = Piwik.getTracker("http://piwikpro/piwik.php", 1 ); piwikTracker .trackPageView();
<code><span>            piwikTracker.enableLinkTracking(true)</span></code>
} catch( err ) {} };script>

Copyright Statement: This article is an original article by the blogger and has not been authorized by the blogger. No reproduction allowed with permission of the owner.

The above introduces piwk's one-page multi-service statistics, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn