Forum Moderators: open
Since many of these leads are coming through paid advertising, I would like to capture the query string of the URL they click on as well. I would prefer to store everything in one cookie.
Any ideas on how to capture the query string? Ideally, into the cookie that is already being created with the referral string?
The query string is in my logs but correlating logs with e-mails is too time consuming to bother with. Expert advice appreciated - I am a cookie novice.
I just sort of stumbled on your message while trying to do exactly what you said you had done with the help of mipapage. I want to have a javascript that captures the referral strings in a cookie and I can insert that value into a form. Would you mind passing that info along to me?
I suppose I'll have to run the script on every page as I won't know in advance which page of my site the user will hit first, as it's not always the home page.
Thanks.
Tim
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);
}
}