Website building and promotion

Webmaster Blog

Analytics and phpBB 2

I’m running several phpBB 2 forums, I was never able to make Google Analytics work on them. Analytics didn’t report any errors, just couldn’t get any stats, it’s so weird.

I finally did some search today and found a solution:

Removed “try {” and “} catch(err) {}” from Analytics code, it worked, although I still don’t know why.

<script type=”text/javascript”>// <![CDATA[

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”>// <![CDATA[

try { var pageTracker = _gat._getTracker("UA-xxxxxx-xx"); pageTracker._trackPageview(); } catch(err) {}

// ]]></script>

Comments are closed.

Webmaster Blog · Powered by WordPress