Script To Add Tracking Codes To Url Links

Discussion in 'JavaScript' started by dalerobbins, May 23, 2007.

  1. #1
    I'm looking for a script, or assistance in composing one, that will scan through the html from a web page and add marketing codes to all the URL links.

    I would like this to be self contained in one html page... and to accept the cut-n-paste input of html code into a textarea, then add tracking codes to all URL links like this <a href="%%track http://www.whatever.com%%"> and output the processed html into another textarea in the same page.

    I also need for this to ignore certain URL links that I specify, and not add tracking codes in those.

    Thanks for any help or direction you can offer!
     
    dalerobbins, May 23, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    ajsa52, May 23, 2007 IP
  3. dalerobbins

    dalerobbins Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks... that's an impressive code, but not quite what I need. I work with Lyris in mailing html emails and have to add tracking codes to URL links before sending out emails. It's a repetitive task that needs some automation. I need something that will add these codes to URL's <a href="%%track http://www.whatever.com%%">.
     
    dalerobbins, May 23, 2007 IP