Hello, I have a Vbulletin v3.8.1 forum and I would like to make the traffic tracking using google analytics, I know that the code must be placed before the </body> tag... But the VB has so many pages and files which can be edited, that Im totally confused. Do you know how and where can I add the tracking code? Thank you!
hmmm, actually it's not </body> tag, it's </head>, so I think there must be a specific file in Vbulletin that I have to edit.
1. Log in to your VB admin control panal 2. Choose Styles & Templates from the left menu 3. Click Styles Manager 4. Select the drop down menu for your active style and choose Edit Templates under Template Options. (second listing down) 5. The page will change but just hit GO next to the dropdown. 6. 3 boxes of code appear, the third is the Footer 7. Scroll all the way down to the end of the code in the box, and put your cursor in the box ready. 8. Type <vb:literal> 9. Paste your Google Analytics Code 10. Type </vb:literal> 11. Scroll to the bottom of the page and hit Save!
why do I have to type this <vb:literal>? cant I just insert the Google analytics code? And, this is gonna be before the </body> tag, will it work?
Its because VB uses a bastardised version of the smarty engine. Without those tags the engine freaks out when interpreting javascript and other codes.
hmm, ok, I'll try without this VB tag, but if it doesnt work I'll add it. Anyways, thank you for the support!
The <vb:literal> tag is only applicable to vBulletin 4.0.0 & above; the OP is using vB 3.8.1 yet. The easiest way to do it is to simply put the GA code into your parent styles "ad_footer_end" template.
Hey guys, I was trying to figure out how to install a GetClicky tracking code into vBulletin and this did the trick. Thanks for the help!