How to integrate google analytics with phpbb3 forum?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
rstocco
Registered User
Posts: 8
Joined: Thu Jan 24, 2008 2:04 am

How to integrate google analytics with phpbb3 forum?

Post by rstocco » Mon Jan 28, 2008 7:28 pm

Hi people,

There is a way to integrate google analytics with the phpbb3 forum?
I didnt found any other way to introduce the question... sorry.

Thanks in advance,
rstocco
Last edited by ric323 on Thu Mar 04, 2010 9:15 pm, edited 1 time in total.
Reason: Topic icon changed

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by ameeck » Mon Jan 28, 2008 10:35 pm

Sure, it's quite easy.

Grab your Analytics code and open styles/prosilver/template/overall_footer.html (or replace prosilver with your current style). Find </body> in the file and add the Analytics code just before it. Then save and upload the file.

After you upload it, clear the cache through the ACP(last button under Board Statistics) to apply changes.

zeno
Registered User
Posts: 36
Joined: Fri Aug 10, 2007 2:22 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by zeno » Mon Jan 28, 2008 11:19 pm

I have several templates, so presumably I need to add this to all of them? Is there anyway to have this in just one file that can be used with all templates and automatically by any I add in the future?

Also, I've added it to the template of the default style, but Google analytics says it can't detect the code. I've cleared the cache, so that's not the problem. Any ideas?

rstocco
Registered User
Posts: 8
Joined: Thu Jan 24, 2008 2:04 am

Re: How to integrate google analytics with phpbb3 forum?

Post by rstocco » Tue Jan 29, 2008 2:56 pm

ameeck wrote:Sure, it's quite easy.

Grab your Analytics code and open styles/prosilver/template/overall_footer.html (or replace prosilver with your current style). Find </body> in the file and add the Analytics code just before it. Then save and upload the file.

After you upload it, clear the cache through the ACP(last button under Board Statistics) to apply changes.
Thanks man, it worked!

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by ameeck » Tue Jan 29, 2008 4:09 pm

zeno: Yes, you have to add it to all template files, one for each style.

Try clearing the cache if GA hasn't detected the code and give it some time, it doesn't detect it right away. To be sure, display the source code of your forum when you are browsing and check if the measuring code is present.

rstocco
Registered User
Posts: 8
Joined: Thu Jan 24, 2008 2:04 am

Re: How to integrate google analytics with phpbb3 forum?

Post by rstocco » Tue Jan 29, 2008 9:37 pm

I believe that it takes one day to start counting...

chrishide87
Registered User
Posts: 30
Joined: Mon Feb 18, 2008 2:34 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by chrishide87 » Mon Mar 10, 2008 5:12 pm

how long before GA detects the code?

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by ameeck » Mon Mar 10, 2008 5:17 pm

One or two days usually.

chrishide87
Registered User
Posts: 30
Joined: Mon Feb 18, 2008 2:34 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by chrishide87 » Mon Mar 10, 2008 5:22 pm

ah right - i'll stop refreshing then...

Bramster
Registered User
Posts: 605
Joined: Sun Jul 27, 2003 10:40 am

Re: How to integrate google analytics with phpbb3 forum?

Post by Bramster » Sun Mar 23, 2008 8:08 am

How about the simple_footer.html ? Are pages using this footer ingnored ?
Navy & Merchant Marine Forum:
www.DutchFleet.net

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by ameeck » Mon Mar 24, 2008 3:57 pm

simple_footer.html is used only for helpers like the "More smilies" windows, the "Search Users" window etc. I don't think they are a key part of the website to keep track of.

kevinsert
Registered User
Posts: 9
Joined: Thu May 01, 2008 2:40 am

Re: How to integrate google analytics with phpbb3 forum?

Post by kevinsert » Thu May 01, 2008 2:49 am

i put this code footer and its like that
</div>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-4280043-1";
urchinTracker();
</script>
</body>
</html>

also other themes that i havent used..but google gives error about this code for 2 days.what im doin wrong everyone says its too simple..:( help me please
my link: www.kaykayci.net

User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: How to integrate google analytics with phpbb3 forum?

Post by Dogs and things » Thu May 01, 2008 7:17 am

What error does Google report?
For phpBB2 support visit phpBB2refugees.

kevinsert
Registered User
Posts: 9
Joined: Thu May 01, 2008 2:40 am

Re: How to integrate google analytics with phpbb3 forum?

Post by kevinsert » Thu May 01, 2008 9:29 am

Dogs and things wrote:What error does Google report?
code isnt detected on your site

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to integrate google analytics with phpbb3 forum?

Post by ameeck » Thu May 01, 2008 10:07 am

I don't see the code in the source code of your page, have you cleared the cache through the ACP after changing the templates?

Locked

Return to “[3.0.x] Support Forum”