Forum Moderators: rogerd

Message Too Old, No Replies

Installing Google Analytics on PHPBB

         

bateman_ap

4:17 pm on Nov 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Example uses SubSilver Template but should be able to adapt to any you have installed.

First open

overall_header.tpl
in your templates/subSilver/ folder.

Search for

</head>

Before this copy your analytics code. So for example your code should look like:


<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-000000-1";
urchinTracker();
</script>
</head>

Next open

simple_header.tpl
and do the same

Save both files and overwrite them on your server.

rogerd

4:20 pm on Nov 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Thanks for posting, bateman. I've tested GA on a vBulletin forum, and it's pretty cool for a free tool.

rogerd

4:07 pm on Jul 24, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Reopening this topic...

Zeno

4:12 pm on Jul 24, 2007 (gmt 0)

10+ Year Member



Thanks.

The GA code doesn't actually belong in the head section. Instead, it should be put right before </body> (see GA manual for more details). That means you'll need to put it in the footer tpl's instead.