[Phphtmllib-devel] SF.net SVN: phphtmllib:[3307] trunk/open2300/lib/core/page/open2300Page.inc
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-11-27 16:41:42
|
Revision: 3307 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3307&view=rev Author: hemna Date: 2009-11-27 16:41:32 +0000 (Fri, 27 Nov 2009) Log Message: ----------- added tracking code Modified Paths: -------------- trunk/open2300/lib/core/page/open2300Page.inc Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2009-11-26 20:24:00 UTC (rev 3306) +++ trunk/open2300/lib/core/page/open2300Page.inc 2009-11-27 16:41:32 UTC (rev 3307) @@ -169,6 +169,10 @@ $this->add( html_comment( "MAIN BODY BLOCK BEGIN") ); $this->add( $this->main_block() ); $this->add( html_comment( "MAIN BODY BLOCK END") ); + + $this->add( html_comment( "tracking code BEGIN")); + $this->add( $this->tracking_code() ); + $this->add( html_comment( "tracking code END")); } /** @@ -221,6 +225,29 @@ $footer_div, html_comment( "FOOTER BLOCK END")); } + + + + /** + * Add the piwik tracking js shite + * + */ + protected function tracking_code() { + $str = '<!-- Piwik --> +<script type="text/javascript"> +var pkBaseURL = (("https:" == document.location.protocol) ? "https://wx.hemna.com/piwik/" : "http://wx.hemna.com/piwik/"); +document.write(unescape("%3Cscript src=\'" + pkBaseURL + "piwik.js\' type=\'text/javascript\'%3E%3C/script%3E")); +</script><script type="text/javascript"> +try { +var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1); +piwikTracker.trackPageView(); +piwikTracker.enableLinkTracking(); +} catch( err ) {} +</script><noscript><p><img src="http://wx.hemna.com/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript> +<!-- End Piwik Tag -->'; + + return $str; + } /***********************/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |