The Arcive of vBulletin Modifications Site. |
|
Statistics by username in Google Analytics Details »»
|
|||||||||||||||||||||||||||
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}
HTML Code:
<script type="text/javascript"> _gaq.push(['_setCustomVar', 1, 'Author', '{vb:raw threadinfo.postusername}',1]); </script> 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
Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
If you are interested in how to do this for CMS articles, please contact me.
|
|
#3
|
|||
|
|||
|
Nice job do you have other interesting tracking functions implemented?
|
|
#4
|
||||
|
||||
|
Quote:
I have some other custom things going on that use some of the same techniques. |
|
#5
|
|||
|
|||
|
Great Mod! Works great. Thank you
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
Is this still working? for some reason it doesn't on my site
|
![]() |
|
|