0
我正从另一位开发人员手中接管一个项目,这项工作并未完全结束,我迷失在试图弄清源和媒体为什么被记录在案但不是关键字。媒体和来源显示在网址中,并在表单中显示为隐藏字段,但关键字不是。这是我相信做我打算做的代码的一部分。如何使用UTM标签跟踪Google AdWords上的关键字
//parse the cookies
var source = _uGC(z, 'utmcsr=', '|');
var medium = _uGC(z, 'utmcmd=', '|');
var term = _uGC(z, 'utmctr=', '|');
// Populate form fields
$(document).ready(function() {
$("#Field113").attr("value", source);
$("#Field115").attr("value", medium);
// If there's a "SearchKeyword" URL param, use it for the 'term'
var SearchKeyword = (location.search.split('SearchKeyword=')[1]||'').split('&')[0];
if ((SearchKeyword && !term) || (SearchKeyword && term == "")) {
$("#Field126").attr("value", term);
}
});