vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Dynamic Google Analytics (https://vborg.vbsupport.ru/showthread.php?t=168536)

Collussus 01-25-2008 07:01 AM

Quote:

Originally Posted by bdude (Post 1428341)
My most humble apologies for not fully testing this (I'm new to vB Development), you should see a new setting group called 'Google Analytics'

Now it works -clicks install-

EDIT:

Do you fill in the number with or without "UA-"?

bdude 01-25-2008 08:56 PM

Quote:

Do you fill in the number with or without "UA-"?
With UA-

Martell 01-26-2008 02:03 AM

Thanks, useful product for analytics on Google.

Collussus 01-26-2008 03:58 PM

Quote:

Originally Posted by bdude (Post 1428930)
With UA-

Doesn't seem to send the information to analytics for me... I'm pretty sure i get around 100 unique hits daily but it only shows 3, seems unlikely to me.

rinkrat 02-02-2008 12:29 AM

I turned it on so I guess I wait a few days and check the stats at Google. :)

DrKNickel 02-07-2008 09:11 AM

Looks nice but does it work? :)

nitro 02-18-2008 10:20 PM

Would this not be better in the global_complete hook location with something like:

PHP Code:

if ($vbulletin->options['ga_enable']) {

        
$vbulletin->config['google_analytics']['replacementvariable'] = '</body>';
        
$output str_replace($vbulletin->config['google_analytics']['replacementvariable'],
        
$code.$vbulletin->config['google_analytics']['replacementvariable'], $output);



This way you are anchoring onto the closing body tag as google instructs and the global_complete location is a better place to do this, not just for vbulletin itself but other addons which may use alternative templates for headers. footers etc.

The google code could perhaps be an additional temple for eval in which case it would want a cache plugin. A textarea option to add scipts to exclude the code from maybe quite a desireable feature to add. Was just a few thoughts, nice hack still. :)

bdude 02-19-2008 02:18 AM

@nitro: Thanks for the suggestions, I am quite new to vB coding - and if I have any spare time, I will try and implement your suggestions.

AndrewC1971 02-26-2008 03:49 PM

do u have to put in the google analytics html

or just you Google Analytics UA number?

tmiland 03-19-2008 03:27 AM

Sweet! :D


All times are GMT. The time now is 06:13 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.01127 seconds
  • Memory Usage 1,739KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete