vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Google Analytics code added to external site links (https://vborg.vbsupport.ru/showthread.php?t=235353)

meissenation 02-08-2010 10:26 PM

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.

Marco van Herwaarden 02-09-2010 10:06 AM

I would be carefull with implementing an OnClick as this can also lead to irritation with your users.

meissenation 02-09-2010 11:33 AM

Can you elaborate? What irritation would it cause?

Marco van Herwaarden 02-11-2010 07:18 AM

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.

meissenation 02-11-2010 12:07 PM

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).


All times are GMT. The time now is 10:12 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00941 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete