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!
IMO is best with click handlers, instead of modifying the url. Take a look at this thread that I made last year: http://forums.digitalpoint.com/showthread.php?t=187903 Learn how it works and then you could modify it to fit your needs.
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%%">.