(function(){ //标识渠道 var utm_campaign = getQueryString("utm_campaign"); //标识终端 var utm_medium = getQueryString("utm_medium"); //标识计划 var utm_source = getQueryString("utm_source"); //标识单元 var utm_content = getQueryString("utm_content"); //标识关健词 var utm_term = getQueryString("utm_term"); addToCookie("utm_campaign",utm_campaign); addToCookie("utm_medium",utm_medium) addToCookie("utm_source",utm_source) addToCookie("utm_content",utm_content) addToCookie("utm_term",utm_term) //根据请求路径中的参数名称获取参数的值 function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null){ return unescape(r[2]); } return null; } //当url路径中参数不为空,且cookie中无此参数时,将更新cookie function addToCookie(name,value){ if(value!=null && value!=""){ if($.cookie(name)==null||$.cookie(name)==""){ //cookie 30天内有效 $.cookie(name,value,{expires:30,path:'/'}); } } } })();

数据市场

所有类别
官方客服