PDA

View Full Version : Help needed with vBulletin 4


adamenty
10-26-2010, 07:27 AM
Hello Guys i need help with vbulletin 4

Can you tell me how & where to put Google Analytics code & Google Adsense code both in vBULLETIN Forum?
Please help & reply.
thanks

Whenever i try to put Google Analytics code in my installed templates Footer. then this error comes


Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3329

The following error occurred when attempting to evaluate this template:
%1$s
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.


Please help

m using vb4

Internetcafe
10-26-2010, 09:08 AM
Google analytics instruction :-
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag

There is NO </head> tag in the footer !

adamenty
10-26-2010, 09:40 AM
Well @ Internetcafe
I gone to Admin CP > Styles Templates > Style manager > My Style > Edit Templates > FORUMHOME & when it opens on top i put the analytics code like this


<head>MY ANALYTICS CODE HERE</head


But this error comes

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3329

vBulletin Message
The following error occurred when attempting to evaluate this template:
%1$s
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.

Internetcafe
10-26-2010, 12:42 PM
You have to make sure the Analytics code is placed just ABOVE the closing </head> tag

EG :-

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XX-XXXXX-XX']);
_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>
</head>

adamenty
10-26-2010, 01:52 PM
Well Thanks done someone helped me regarding this