vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Help needed with vBulletin 4 (https://vborg.vbsupport.ru/showthread.php?t=252637)

adamenty 10-26-2010 07:27 AM

Help needed with vBulletin 4
 
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

Quote:

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 :-
Quote:

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

Code:

<head>MY ANALYTICS CODE HERE</head
But this error comes

Quote:

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 :-

Quote:

<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


All times are GMT. The time now is 05:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00990 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete