Results 1 to 3 of 3

Thread: Javascript to track click

  1. #1
    Join Date
    Feb 2009
    Posts
    123

    Javascript to track click

    I have created a website where there are many outbound links of my clients on my Website and i want to track those links.For that i have asked my friends about the same they told me that it's possible with Javascript,but he also don't know what would be the code for it.Can anyone provide me the code where i can track number of clicks are being made on that particular link.

  2. #2
    Join Date
    Dec 2008
    Posts
    135

    Re: Javascript to track outbound Clicks

    Try to use following javascript to track outbound click by creating body.onclick and new image().


    Code:
    if(demo.body){ demo.body.onclick = cs_det_oc; }
       else if(demo){ demo.onclick = cs_det_oc; }
    
       var a = new Image(); 
       a.src = trackURL;

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Javascript to track click

    Try to use the piece of javascript will assign a pageview to any click on a link

    For example, to log every click on a particular link to xyz.com as a pageview for "/outgoing/example_com" you would add the following attribute to the link's tag:

    Code:
    <a href="http://.xyz.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">
    And it also a good thought to keep a log of all the outbound links which you are having on your site, this will work even if you are not there too and for checking the report you need to check your Top Content report after some hours when the updated tracking code has been executed.

Similar Threads

  1. Inaccuracy in Click Track of Audacity.
    By Lennon Norris in forum Windows Software
    Replies: 4
    Last Post: 11-03-2012, 04:12 PM
  2. Converting Mono track into stereo track using Audacity
    By Non-$ensoi in forum Windows Software
    Replies: 8
    Last Post: 11-03-2012, 11:48 AM
  3. Adding Click track to an MP3 in Audacity
    By X-MaaN in forum Windows Software
    Replies: 6
    Last Post: 23-07-2011, 11:21 AM
  4. iTunes cannot keep the track of older track
    By Mattador in forum Windows Software
    Replies: 4
    Last Post: 28-04-2011, 05:45 AM
  5. Replies: 2
    Last Post: 20-06-2009, 12:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,650,662.92001 seconds with 16 queries