About Me: I'm a freelance web developer that specializes in WordPress Themes and plugin development. I've written about some of my projects here.
Thanks to Nathan I was able to implement some javascript that would dynamically replace some eye-anchors through a query string in the URL on my company’s website.
We’ve been wanting to create some value propositions to our prospects on different marketing channels for a while now but until we get Omniture’s Test and Target we’ll have to settle for this little trick.
For our tests we’re going to take our normal landing pages and present different creative to our major channel, pay-per-click. Making sure we keep this test meaningful we’re keeping the old add copy and landing page but splitting the ad campaign, essentially making it a multi-variant test by splitting traffic to the same page with different query strings.
On to the technical side of things:
<script src="http://dancameron.org/qs.js"></script></head>
<script> /* Query String Script ask DanC to modify or use */ var qs = new Querystring(); var img=qs.get('img','http://dancameron.org/default.jpg'); var title=qs.get('title','default tile'); var url=qs.get('url','default.url'); var alt=qs.get('alt','default.alt'); document.write('<a href="'+url+'"><img src="'+img+'" border="0" alt="'+alt+'" title="'+title+'"></a>'); </script>
http://test.com?img=http://dancameron.org/mytestimage.jpg&alt=blah&title=blah&url=http://google.com