Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
BBR Google Analytics Addon Details »»
BBR Google Analytics Addon
Version: 1.0.3, by BBR-APBT BBR-APBT is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.0.x Rating:
Released: 12-01-2009 Last Update: 01-30-2010 Installs: 815
Uses Plugins Auto-Templates
 
No support by the author.

I will no longer support vBulletin because of IB and the agile development, and they are not fixing bugs like they should. Instead they add bloat.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
comunidadmh, misericorde

Comments
  #102  
Old 01-22-2010, 11:49 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sotonforum.co.u View Post
I don't understand where I add the Tracking Code from Google?
Is it in a template? If so, which one?
Or do I need to edit the xml?
I'm so confused!?
once you import the xml file, all you need to do is go to your adminCP -> settings -> options-> BBR- Google

and put in your api key number.

You will not receive no more support till you click install.
Reply With Quote
  #103  
Old 01-23-2010, 04:03 PM
Sotonforum.co.u Sotonforum.co.u is offline
 
Join Date: Nov 2009
Location: Hampshire, UK
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankyou for speedy response.
I hadn't marked it as installed yet as I didn't think I had fully installed it. I've marked it now.
I thought I had to add my Google analytics code above the </body> tag of one of the files?
Reply With Quote
  #104  
Old 01-23-2010, 05:33 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sotonforum.co.u View Post
Thankyou for speedy response.
I hadn't marked it as installed yet as I didn't think I had fully installed it. I've marked it now.
I thought I had to add my Google analytics code above the </body> tag of one of the files?
No just import the XML file via plugins and products.

They add your key in the settings/options in the adminCP.
This adds the code for you automatically.
Reply With Quote
  #105  
Old 01-25-2010, 03:51 PM
Jeremy8 Jeremy8 is offline
 
Join Date: Jan 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found a mistake:
Quote:
Remember it takes 24hours for Google to collect data. To make sure it works look at the source code and make sure the google code is displayed just above the </body> tag.
I think you meant </head>
Reply With Quote
  #106  
Old 01-25-2010, 05:30 PM
Sotonforum.co.u Sotonforum.co.u is offline
 
Join Date: Nov 2009
Location: Hampshire, UK
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your help BBR-APBT.
Reply With Quote
  #107  
Old 01-28-2010, 06:05 PM
g10net g10net is offline
 
Join Date: Jan 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When adding or inserting Google Analytics tracking code in vBulletin 4 forums software, either in styles, templates, plugins, products or ad HTML code of newly added advertising function, error message similar to the following may appear when saving the code:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ‘[‘
in /home/forums/includes/adminfunctions_template.php(4595) : eval()’d code on line 18

This is likely caused by a malformed conditional statement. It’s highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Two options of “Go Back” or “Continue” are available for user selection. And of course, even if user forcefully save and make active or enable the Google Analytics tracking code, the script doesn’t work, and does not appear on web pages.

Google Analytics tracking code or script contains some special characters which does not parse properly. Thus, in order to embed Google Analytics tracking code, the easier way is to wrap the code with <vb:literal> and </vb:literal> tags so that the code is treated literally during page rendering.

For example,

<vb:literal>
<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("****");
pageTracker._trackPageview();
} catch(err) {}</script>
</vb:literal>

The Google Analytics tracking code can be placed in footer template, or better suggestion is to place it into ad_footer_end template (inside Ad Location Templates) as to avoid future upgrading issues where templates need to manually merged.
Reply With Quote
  #108  
Old 01-28-2010, 09:19 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by g10net View Post
When adding or inserting Google Analytics tracking code in vBulletin 4 forums software, either in styles, templates, plugins, products or ad HTML code of newly added advertising function, error message similar to the following may appear when saving the code:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ?[?
in /home/forums/includes/adminfunctions_template.php(4595) : eval()?d code on line 18

This is likely caused by a malformed conditional statement. It?s highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


Two options of ?Go Back? or ?Continue? are available for user selection. And of course, even if user forcefully save and make active or enable the Google Analytics tracking code, the script doesn?t work, and does not appear on web pages.

Google Analytics tracking code or script contains some special characters which does not parse properly. Thus, in order to embed Google Analytics tracking code, the easier way is to wrap the code with <vb:literal> and </vb:literal> tags so that the code is treated literally during page rendering.

For example,

<vb:literal>
<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("****");
pageTracker._trackPageview();
} catch(err) {}</script>
</vb:literal>

The Google Analytics tracking code can be placed in footer template, or better suggestion is to place it into ad_footer_end template (inside Ad Location Templates) as to avoid future upgrading issues where templates need to manually merged.

Simple install my plugin. Makes it easier all the way around.
Reply With Quote
  #109  
Old 01-28-2010, 10:09 PM
balkanboy balkanboy is offline
 
Join Date: Dec 2008
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #110  
Old 01-30-2010, 03:27 PM
Gnappy Gnappy is offline
 
Join Date: Sep 2003
Location: Italy
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

really useful.

Thanks dude!
Reply With Quote
  #111  
Old 01-31-2010, 07:20 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated:
Version: 1.0.3 - Rewrite of the code to give the option to use the (Standard Tracking Code) or the (Asynchronous Tracking Code)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:40 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.06337 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete