Adding Google Analytics

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)
footballscoops
Registered User
Posts: 38
Joined: Sat Jun 28, 2008 1:39 pm

Adding Google Analytics

Post by footballscoops »

How do I add Google Analytics to cover all the page views on our message board?

Any advice?
Pit$Bull
Former Team Member
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: Adding Google Analytics

Post by Pit$Bull »

Knowledge Base - Advertisements in phpBB3

Take particular note of the important notice half way down regarding Google ads. Due to the google terms and conditions, the ads should only go in the index_body.html, viewtopic_body.html and viewforum_body.html files. Do not put them in the overall_header or footer.
footballscoops
Registered User
Posts: 38
Joined: Sat Jun 28, 2008 1:39 pm

Re: Adding Google Analytics

Post by footballscoops »

I need to add the Google Analytics code. I do not want to run actual ads.

Can you please tell me where to add the code, so that Google Analytics will count our page views?
Pit$Bull
Former Team Member
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: Adding Google Analytics

Post by Pit$Bull »

I suggest overall_footer.html on the style you are using.
footballscoops
Registered User
Posts: 38
Joined: Sat Jun 28, 2008 1:39 pm

Re: Adding Google Analytics

Post by footballscoops »

In between what lines do I install the code in the overallheader?
That is where I am confused.
Pit$Bull
Former Team Member
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: Adding Google Analytics

Post by Pit$Bull »

Just above the </body> tag in the overall_footer (not overall_header)
The Gamer Board
Registered User
Posts: 50
Joined: Mon Jun 09, 2008 3:15 am

Re: Adding Google Analytics

Post by The Gamer Board »

Add it in either overall_header or overall_footer, since those are shown in all pages of the site.
Visit my new gaming forum (started on June 08, 2008), The Gamer Board.
thenewshmoo_1
Registered User
Posts: 21
Joined: Sun Jun 22, 2008 9:51 pm
Location: http://www.pandorasboxing.com

Re: Adding Google Analytics

Post by thenewshmoo_1 »

Has anyone compared google analytical data on a phpbb forum with that of something like awstats on a traditional web hosting?

I have a feeling the stats generated by google on a phpbb forum will not give a true indication of your site statistics, or maybe google is cleverer than i think.
Plox
Registered User
Posts: 186
Joined: Mon Jul 07, 2008 8:40 pm

Re: Adding Google Analytics

Post by Plox »

I put it in overall_footer of my style, and it's working well.
000webhost - Host your phpBB forum for free.
tittiger
Registered User
Posts: 46
Joined: Tue May 27, 2008 4:53 am

Re: Adding Google Analytics

Post by tittiger »

I have been over and over my 3.x i nstall in can not find any of the files i.e. overall_footer that you mention...
What is the path to this file?

I do find a style sheet, style.css however.

Thanks,

Joe
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric

Re: Adding Google Analytics

Post by ric323 »

In a default install, it would be:
http://your_board_address/styles/prosilver/template/overall_footer.html
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
tittiger
Registered User
Posts: 46
Joined: Tue May 27, 2008 4:53 am

Re: Adding Google Analytics

Post by tittiger »

I don't get it - there is no styles directory in my default install! :-(

Joe
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric

Re: Adding Google Analytics

Post by ric323 »

What is the address of your board?
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
krutoi
Registered User
Posts: 1
Joined: Sat Oct 10, 2009 7:22 pm

Re: Adding Google Analytics

Post by krutoi »

After you add the code to overall_footer.html, be sure to clear your cache from the admin panel - otherwise the modified page will not be active. Took me a few minutes to figure this out :-)

Return to “[3.0.x] Support Forum”