Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Statistics by username in Google Analytics Details »»
Statistics by username in Google Analytics
Version: 1.1, by tpearl5 tpearl5 is offline
Developer Last Online: Aug 2022 Show Printable Version Email this Page

Category: Statistics Modifications - Version: 4.x.x Rating:
Released: 05-02-2012 Last Update: Never Installs: 25
Template Edits
 
No support by the author.

Have you ever wanted to see whose threads get the most traffic? Well, this simple addition can make that happen.

Open SHOWTHREAD

Find
HTML Code:
{vb:raw poll}
Add after:
HTML Code:
<script type="text/javascript">
_gaq.push(['_setCustomVar', 1, 'Author', '{vb:raw threadinfo.postusername}',1]);
</script>
This is assuming that your Analytics code is in the header of your site

The report will be available in Google Analytics under Custom Variables.

Update 5/21/2012: 1.1 - changed added Google Analytics tag from memberaction_update to SHOWTHREAD so multi-page threads will be tracked. For example, if someone lands on page 3 of a thread, the author will still be tracked in Analytics.

Screenshots

File Type: jpg vbulletin_username_track.jpg (45.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-10-2012, 01:19 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are interested in how to do this for CMS articles, please contact me.
Reply With Quote
  #3  
Old 05-14-2012, 12:28 PM
Kolbi Kolbi is offline
 
Join Date: Mar 2009
Location: D - S?dbaden
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice job do you have other interesting tracking functions implemented?
Reply With Quote
  #4  
Old 05-14-2012, 07:38 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kolbi View Post
Nice job do you have other interesting tracking functions implemented?
yes actually: https://vborg.vbsupport.ru/showthread.php?t=275526

I have some other custom things going on that use some of the same techniques.
Reply With Quote
  #5  
Old 05-21-2012, 02:21 AM
CaneInsider CaneInsider is offline
 
Join Date: Sep 2010
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod! Works great. Thank you
Reply With Quote
  #6  
Old 02-17-2013, 10:53 AM
malmazan malmazan is offline
 
Join Date: Feb 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing this.

Since vB does not provide total views for a section, I have used
<vb:if condition="in_array($vbulletin->parentnode, array(5)) OR $vbulletin->nodeid == 5">

type conditions to add a Google custom code for that ("5" would be the id for the section).

vB does not provide the total number of views for each sub-forum, so it would be nice to add a sub-forum setCustomVar for GA also on SHOWTHREAD , but, unfortunately I have not been able to get the title for the sub-forum on the SHOWTHREAD template.
Reply With Quote
  #7  
Old 12-05-2015, 10:41 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this still working? for some reason it doesn't on my site
Reply With Quote
Reply


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 02:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07943 seconds
  • Memory Usage 2,276KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete