I need to set a cookie whenever a user clicks through one of our affiliate links and lands on our site with "src=uni" in the URL. The URLs will look something like this:
http://www.myadmin.com?src=uni&utm_source=uni&utm_content=[publisher_ID]
Function to create cookie:
function SetCookie() {
var url = window.location.href;
if(url.indexOf('?src' + uni) = 1)
document.cookie="QueryCookie";
}
Can somebody help me by telling where I am going wrong in creating this Cookie based on query parameters?