FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Analytics (Error)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Analytics [message #165957] Fri, 02 September 2011 08:41 Go to next message
Anik is currently offline  Anik
Messages: 36
Registered: August 2011
Location: India
Karma: 0
Member
add to buddy list
ignore all messages by this user
Hello,

i was trying to add ggl analytics code on my forum..
but each time i am adding it to the header.tmpl file, th forum becoming unusable..
even i can't access the admin panel also..
i tried the footer file,
but same problem..
do you have any idea where i have to add it?

Thanks,
Re: Analytics [message #165958 is a reply to message #165957] Fri, 02 September 2011 08:48 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 662
Registered: May 2009
Location: USA
Karma: 2
Senior Member
add to buddy list
ignore all messages by this user
I don't mess with such things but I'm pretty sure it goes in the footer, do a search I believe there was a topic on it some time back that might have more info.

"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Analytics [message #165959 is a reply to message #165958] Fri, 02 September 2011 09:56 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
You have 2 options:
1. Edit your footer.tmpl, add the Google code and rebuild your themes.
2. Enable the google_analytics plugin (much easier, obviously!)
Re: Analytics [message #165964 is a reply to message #165959] Fri, 02 September 2011 11:44 Go to previous messageGo to next message
Anik is currently offline  Anik
Messages: 36
Registered: August 2011
Location: India
Karma: 0
Member
add to buddy list
ignore all messages by this user
Hello,

this is the footer file i added the content but after rebuilding the theme site becoming unavailable, even i cant use admin panel so i have to reinstall the forum and lost all data..
/**
* copyright            : (C) 2001-2011 Advanced Internet Designs Inc.
* email                : forum(at)prohost(dot)org
* $Id: footer.tmpl 5325 2011-07-15 14:14:17Z naudefj $
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; version 2 of the License.
**/

{MAIN_SECTION: footer // The forum's footer.}
{IF: !empty($RIGHT_SIDEBAR)}
</td><td width="200px" align-"right" valign="top" class="sidebar-right">
	{VAR: RIGHT_SIDEBAR}
{ENDIF}
</td></tr></table>

</div>
<div class="footer ac">
	<b>.::</b>
	<a href="mailto:{GVAR: ADMIN_EMAIL}">{MSG: forum_contact}</a>
	<b>::</b>
	<a href="{TEMPLATE: footer_lnk}">{MSG: forum_home}</a>
	<b>::.</b>
	<p class="SmallText">Powered by FUD Forum</p>
</div>
{INJECTION_POINT: right_block}

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24****9-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body></html>
{MAIN_SECTION: END}

{MAIN_SECTION: footer_plain // Yet another footer for plain pages such as popups.}
</div>
</body></html>
{MAIN_SECTION: END}

{SECTION: footer_lnk // Link to forum's Home Page.}
{ROOT}?t=index&amp;{DEF: _rsid}
{SECTION: END}
Re: Analytics [message #165966 is a reply to message #165964] Fri, 02 September 2011 11:49 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
You need to change all the single quotes in the JavaScript code to double quotes. Escaping will also work if you insist.
Re: Analytics [message #165968 is a reply to message #165964] Fri, 02 September 2011 11:57 Go to previous message
Anik is currently offline  Anik
Messages: 36
Registered: August 2011
Location: India
Karma: 0
Member
add to buddy list
ignore all messages by this user
u mean this

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24****9-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>


to this,

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(["_setAccount", "UA-24****9-1"]);
  _gaq.push(["_trackPageview"]);

  (function() {
    var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
    ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
    var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

[Updated on: Fri, 02 September 2011 11:58]

Report message to a moderator

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Backup/restore fails 3.0.3RC1 (FIXED)
Next Topic: open_basedir restriction.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 17 18:35:35 EST 2017

Total time taken to generate the page: 0.00777 seconds