Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Google Analytics


i'd like to add google analytics to my php-fusion website, but i dont know where to place the code.

Hope someone could tell me.

Thank you very much!
first - where do you want? Maybe in footer?
If so - use footer includes for this (includes/footer_includes.php) .

i go to that file, and put the google analytics code and then try to load the website and i get an error. I write the code here:

//Add your custom include files for the footer here
My code .......
In Panels I place it in a centre panel and display on all pages using add_to_footer function.

Admin >>> System >>> Panels >>> New Lower Centre Panel

Paste in your analytics's code like this...

add_to_footer("//your analytics's code here");

Remember to change all " in your analytics's code to ' but do not change them 2 at the beginning and end. Also remember to display on all pages.
It's faster for engine - remove all the content from footer_includes.php, afterward paste your code,

but... of course much easy to do like Craig said, with panel;

so, do as you like.
GA is best placed in the footer as PolarFox and Craig have remarked. I must say I like Craig's method though... very clean code.
No solutions for me above.. Doesn't work for me...


Martijn78 wrote:

No solutions for me above.. Doesn't work for me...

You were doing something wrong. I say "were" because I see you got it working here http://www.survivalteam.nl/news.php, if that's your website.
Whenever you solve a problem you asked help with come back and tell us you fixed it, and how if you think is necessary.
Thread Information
8 posts
3,566 times
Last Post
Last updated on 8 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Martijn78, Craig, Davidds, PolarFox, JoiNNN, The Heat