【问题标题】:In Adobe Omniture DTM's Event Based rule, how do i define the link name inside the custom script在 Adob​​e Omniture DTM 的基于事件的规则中,如何在自定义脚本中定义链接名称
【发布时间】:2017-03-06 20:41:45
【问题描述】:

我在 Adob​​e DTM 中创建了一个基于事件的规则,该规则在单击“.link-name”时触发。但是,我不想对链接名称进行硬编码,而是想通过自定义页面代码部分来定义它。我试过 s.linkName = 'custom name';但这没有做任何事情。 我试过 s.tl(this, 'o', 'custom name') 但这两次触发了事件。有没有办法在自定义页面代码中只定义链接名称?我觉得应该有一种方法可以做到这一点,我错过了。谢谢你。

【问题讨论】:

    标签: javascript adobe analytics


    【解决方案1】:

    这可能是您要问的:

    1) Adob​​e DTM 可以获取动态值:

    在“Adobe Analytics”部分中,将 Prop、eVar 或链接名称设置为:

    %this.href%
    

    您还可以设置其他动态值。从这个网站查看 DTM 备忘单。

    http://jimalytics.com/tag-management/dynamic-tag-manager-dtm-cheat-sheet/

    2) 您可以尝试使用“自定义规则条件”中的 satellite.setVar() 方法设置数据元素:

    //Set a value 
    var customLink = "www.yourCusomLink.com";
    
    //Set DTM Data Element to that value
    _satellite.setVar("Element Name", customLink);
    
    //Inside Custom Rules - the code must return "true" for rule to fire
    return true;
    

    将 Prop、eVar 或链接名称设置为:

    //Adobe Analytics syntax for passing value of custom data element
    %Element Name%
    

    规则将触发并在内部传递自定义值

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-11
      • 1970-01-01
      • 1970-01-01
      • 2014-07-20
      • 1970-01-01
      相关资源
      最近更新 更多