The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Google Analytics code added to external site links
Hey guys,
This sounds like it's really easy to do but I don't know how. I know there's other mods that take all e-bay links and rewrite them for profit purposes. What I'd like to do is add the following to all external website links: onClick="javascript: pageTracker._trackPageview('/link/linkname');" That way we can track what links are being clicked from our site. This ideally would be an add-on to BBR's Google Analytics mod. |
#2
|
|||
|
|||
I would be carefull with implementing an OnClick as this can also lead to irritation with your users.
|
#3
|
|||
|
|||
Can you elaborate? What irritation would it cause?
|
#4
|
|||
|
|||
A simple example. I am used to Shift-Click to open many threads from the forumdisplay (or New posts page) into a new tab before i go read them all. It is very irritating if you both get a new tab with the requested page, and the main tab does not stay on the forumdisplay listing but also reacts on the OnClick and opens a new page in your main tab also.
|
#5
|
|||
|
|||
We're still not on the same page and I don't know where you're coming from with new pages and such. If you click a link that has the above code in the original post, the link functions 100% the same, but the Google Analytics script already running in the header picks up on the fact that the link was clicked and logs it into your Analytics account. No new pages are opened.
I unfortunately don't have a live site with a link to an external page that I can readily edit the HTML for, so I added the code to one of my HTML pages and added it to an internal link... no big deal, just tracking false data. http://mifbody.com/meetgreet/ and then click on the "Register" link on the left navigation bar. There's no noticeable difference to the end user, but the code is still tracking that it was clicked (you can see it in the source code). |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|