Google Analytics
From PhpCOIN Documentation
To configure Google Analytics in your phpCOIN website just follow these simple instructions: - In your theme's core.php file within function do_page_closeout() and immediately before the </body> tag is output, add some code to output the google code. For instance, in /cantex theme starting around line 995 is:
# Add WYSIWYG (if found) to output IF ($tinymce) {$_out .= ;} ELSEIF ($htmlarea)
{$_out .= $htmlarea;}
- Close html
$_out .= '</body>'.$_nl; $_out .= '</html>'.$_nl;
Immediately before the - Close html line, add something like this:
$_out .= '<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :
"http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\'
type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._initData();
pageTracker._trackPageview();
</script>';
Where you have to replace the xxxxxxx with your Google Analytics Code.
Note that since the string starts and ends with a single apostrophe, any apostrophes within the string must be preceded by a backslash to escape them.

