Using Woopra with vBulletin
I’ve been using Woopra, the real-time Web tracking and analysis application, with CodeHill for over year now. The WordPress plugin they provide is working perfectly. But I recently added DoFollowForum.com, which is running vBulletin, and the available plugin was for an older version of vBulletin than the one I have installed. So I added the following tracking code to the style’s footer to track users with their usernames and emails.
|
1 2 3 4 5 6 7 8 |
<if condition="$bbuserinfo[userid]!=1">
<script type="text/javascript" src="//static.woopra.com/js/woopra.v2.js"></script>
<script type="text/javascript">
woopraTracker.addVisitorProperty("name", "<phrase>$bbuserinfo[username]</phrase>");
woopraTracker.addVisitorProperty("email", "<phrase>$bbuserinfo[email]</phrase>");
woopraTracker.track();
</script>
</if> |
The if statement is to make sure I dont track the user with the user id 1. Line 4 and 5 use vBulletin’s array $bbuserinfo to get the username and email. When using vBulletin’s variables inclose them in a






Thanks for the code. I’ll add it to our Installation Guide tips!
Thank you Lorelle for the link in Woopra’s Installation Guide. Its an honor.
Hey, How can I use this with a subdomain? this is the subdomain code:
woopraTracker.setDomain(“mysitenamehere.com”);
woopraTracker.track();
sorry code got cut off..
Hey Peony, just call setDomain() before calling track(), and setDomain()’s argument is the root domain not the sub-domain. e.g.:
And by the why, the Basic (free) account doesn’t log sub-domains.
hey I just upgraded and did what you posted added it to footer did you mean I should change the domain to be domain.com/forum? where it says codehill
The following error occurred when attempting to evaluate this template:
The conditional on line 143 appears to be missing its beginning tag (). This may cause unexpected behavior.
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.
hey i am not sure that its working now i didnt get an error, i copied from plain texyt but i dont see if its tracking or not or anything about users linked to visitors? thanks!!!!
Hey peony, if you want to use it with a folder in the domain for example domain.com/forum all you need it the code in the post. But if you want to use it with a sub-domain for example forum.domain.com then use the code I added in the comments. This should resolve the error.
When it starts working you’ll see the visitor’s login instead of Visitor in the Live tab above the flag and to left of the Start Chat button. And if you don’t have a visitor currently logged into your forum you could go to the Analytics tab and then click on Custom where you’ll find the login names under Tagged Visitors.
Hey Amgad,
Ok well Its on a .com/forum so I have the code you put just .com put this in the footer of the template, at first it showed my username logged into the forum now its not showing me or anyone makes me think i am doing something wrong!!
Could you please post the code you put in your footer and let me check it out.
I think its only showing the wordpress visits bc I just signed into WP and then it showed my Uname but i dont know
this is the code
1.
2.
3.
4. woopraTracker.addVisitorProperty(“name”,
5. “$bbuserinfo[username]“);
6. woopraTracker.addVisitorProperty(“email”,
7. “$bbuserinfo[email]“);
8. woopraTracker.setDomain(“codehill.com”);
9. woopraTracker.track();
10.
11.
I put the domain name of my root domain, the wordpres sinstall is on the .com and the forum is .com/forum
but I just said .com like codehill.com is. Let me know, you can email e too if you want.. Thanks!
Peony the code you posted will not work, it’s missing a few lines and you shouldn’t use the setDomain function because you aren’t running the forum from a sub-domain. Just copy the following code and paste it instead of your code, it will work with your forum without any changes:
To copy the code please use the View Plain link right above it.
Hey thanks but I dont think that code works
doesnt show the users fro the forum at all!
OOH i think it might work now