+1 works fine in the footer.
Google Analytics
Collapse
X
-
-
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12059730-4");
pageTracker._trackPageview();
} catch(err) {}</script>
I added the above code to the VERY END in the footer template, and I get the following error by vbulletin when I save the file:
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected '[' in /home6/intraspa/public_html/includes/adminfunctions_template.php(4597) : eval()'d code on line 131
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Thanks!Comment
-
I just landed from Mars
what good does this do for the site if ya'll don't mind?
EDIT: I went to the site to sign up and come to find out that I already have an account.. must've been years ago lolLast edited by Merjawy; Sat 9 Jan '10, 8:38am.To be or not to be... Where the hell is the question????My psychiatrist told me I was crazy and I said I want a second opinion. He said okay, you're ugly too
Live vBulletin 4.2.0 Multilingual * Alpha/Beta vB 4 - vB 5 Tier 1A
CentOS 6.2 - Apache:2.2.15(Apache2Handler) - PHP:5.3.3 - MySQL:5.1.61
Xampp/Win-XP - Apache v2.2.21(Apache2Handler) - PHP:5.3.8 - MySQL:5.5.16
Comment
-
Gives stats for your site.s.molinari - I would like to ask all customers to definitely feedback issues with the software and be specific with the issues, but to basically suck-up what happened in the past and try to just look forward.Comment
-
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12059730-4");
pageTracker._trackPageview();
} catch(err) {}</script>
I added the above code to the VERY END in the footer template, and I get the following error by vbulletin when I save the file:
Should I just ignore this or change what I did? Please advice.
Thanks!
What version of vB are you running exactly?Comment
-
Comment
-
Nice, but now I have other problem, I guess is a problem: I added the google analytics in footer template, but I have lines of code over </body> I guess this is a problem for google analytics, I do not how delete that,
Please help me....
Code:
____________________________________________________________
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5885100-3");
pageTracker._trackPageview();
} catch(err) {}</script>
<script type="text/javascript"><!--
window.orig_onload = window.onload;
window.onload = function() {
if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}
if(typeof window.orig_onload == "function") window.orig_onload();
}
//-->
</script>
</body>
</html>
____________________________________________________________Comment
-
Adding Analytics to vBulletin 4.0
Why the <vb:literal>? Its because VB uses a bastardised version of the smarty engine. Without those tags the engine freaks out when interpreting javascript and other codes.- Log in to your VB admin control panal
- Choose Styles & Templates from the left menu
- Click Styles Manager
- Select the drop down menu for your active style and choose Edit Templates under Template Options. (second listing down)
- The page will change but just hit GO next to the dropdown.
- 3 boxes of code appear, the third is the Footer
- Scroll all the way down to the end of the code in the box, and put your cursor in the box ready.
- Type <vb:literal>
- Paste your Google Analytics Code
- Type </vb:literal>
- Scroll to the bottom of the page and hit Save!
Taken from
Works fine for me .
👍 1Comment
-
Adding Analytics to vBulletin 4.0
Why the <vb:literal>? Its because VB uses a bastardised version of the smarty engine. Without those tags the engine freaks out when interpreting javascript and other codes.
- Log in to your VB admin control panal
- Choose Styles & Templates from the left menu
- Click Styles Manager
- Select the drop down menu for your active style and choose Edit Templates under Template Options. (second listing down)
- The page will change but just hit GO next to the dropdown.
- 3 boxes of code appear, the third is the Footer
- Scroll all the way down to the end of the code in the box, and put your cursor in the box ready.
- Type <vb:literal>
- Paste your Google Analytics Code
- Type </vb:literal>
- Scroll to the bottom of the page and hit Save!
Taken from
Works fine for me .
Comment
-
And be sure when -and if- you change the default style, to copy the code and paste it to the new footer template! I forgot it and now some days appear with no visitors!Check my site and don't worry if it's all Greek to you
It's all Greek to everybodyComment
-
The same thing is happening with my google analytics account, I can see no visitor from past 1 month. How I can change it any idea ? It's showing me complete blank in my Analytics acccount. What should I do ? Help me..
Regards
IndiaGarageComment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment