Forum Moderators: DixonJones
That works fine when sending the user directly to the affiliate's site, because the site has a tool that grabs the keyword so I can find out what terms convert.
BUT, if I want to send the visitor to a landing page on my site first, the keyword information gets lost, or rather, I don't know how to capture it and pass it along when (if) the visitor clicks a URL leading to the affiliate site. How can I grab the parameter from the URL, then pass it to the affiliate site?
I'd appreciate any help - thanks!
Sharon
[edited by: Woz at 1:04 pm (utc) on Feb. 4, 2005]
[edit reason] examplified URLs [/edit]
<script type="text/javascript">
if (location.search.length > 0) {
launchString = location.search.substring(1, location.search.length);
var launchStringArray = launchString.split("&");
for (var i = 0; i <= launchStringArray.length - 1; i++) {
var left = launchStringArray[i].substring(0, launchStringArray[i].indexOf("="));
var right = launchStringArray[i].substring(launchStringArray[i].indexOf("=") + 1, launchString.length);
if (isNaN(right)) {
right = '"' + right + '"';
}
eval("var " + left + " = " + right);
}
}
</script>
Now, any ideas on how to put in a URL the user can click on, so it gets passed to the sales page?
Sharon