1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Tracking Outgoing Links

Discussion in 'PHP' started by rurbaniak, Feb 3, 2006.

  1. #1
    Okay, what I need to accomplish is to track Links that are clicked that go outside of my site.

    For example: http://www.google.com

    For SEO purposes I need the link to remain as it without changing it to some kind of tracker.php page which records the click. So I don't want all of my links to look like <a href="http://mysite.com/tracker.php?id=1" title="Keywords." >Your Text and Link</a>

    On the click of the link, I also need to track who the Vbulletin user is, as well as count the # of times that link was clicked.

    Get my drift? I'm sure many of people have run into this sort of situation.

    What's the best way to go about it? Any examples would be great.
     
    rurbaniak, Feb 3, 2006 IP
  2. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
  3. rurbaniak

    rurbaniak Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    rurbaniak, Feb 3, 2006 IP
  4. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Customize it.
     
    MediaHustler, Feb 3, 2006 IP
  5. dotboost

    dotboost Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Record the click with javascript, like:
    <a href="http://outside-site.com" onClick='somefunction(link_name)'>Outsidelink</a>
    In somefunction() you need to a call an image , like:
    <img src="counter.php?link=link_name">
    So you can count that way all users which click the link (if they have javascript enabled, of course), also their vbulletin_user_id you need to get it from session, in counter.php file.
    Hope is not too confusing....
     
    dotboost, Feb 3, 2006 IP
  6. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This is how google do it so it must be OK.
     
    dave487, Feb 4, 2006 IP