Adobe DTM to set query string in eVar and sProp

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 22:34:27

For variables that only look for a single URL parameter:

Create a Data Element of Type URL Parameter. For Parameter Name, put e.g. "Role" (no quotes) for prop28. Alternatively, you can do the same thing below, for multiple.

For variables that look for multiple URL parameters:

Create a Data Element of Type Custom Script. Click the [Open Editor] button and in the code box, add the following:

var d=':',
    p=['cid','pid','eid'],
    v=[],c,l,q;
for (c=0,l=p.length;c<l;c++) {
  q=_satellite.getQueryParamCaseInsensitive(p[c]);
  if (q) v.push(q);
}
return v.join(d);

The d= and p= values are based on what you have for eVar8. This isn't 100% the same as AA's s.getQueryParam plugin but it's most of it; the parts you care about based on your posted code.

Reference the Data Element(s)

In the Adobe Analytics tool config, in the Global Variables section, you can add your prop(s) and eVar(s) there, using %data_element_name_here% syntax.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!