Omniture - Is it possible to count number of clicks per special tagged link?

◇◆丶佛笑我妖孽 提交于 2019-12-25 00:07:20

问题


I'm trying to figure out is it possible to track number of clicks per special links via Omniture.js (s_code.js). For example -

Set of links should have something like tag_1, others tag_2 etc.:

<a href="#" data-tag="tag_1">Menu link 1</a>
<a href="#" data-tag="tag_1">Menu link 2</a>
<a href="#" data-tag="tag_1">Menu link 3</a>

<div class="some-wrapper">
   <a href="#" data-tag="tag_2">Some button</a>
</div>

On click I need to +1 for special tag, that's way counting number of clicks per different classes of links.

Official documentation is really confusing, should I somehow do this by specifying eVars or props?


回答1:


Different variables can be used to populate different reports. Which variables you want to populate depend on what business questions you are trying to answer. For example, if you simply want a running count of # of clicks and that's it, all you really need is the answer provided by @BrettAHale. But if you are looking for more robust reporting, e.g. correlating clicks with other activities or data, then you're going to want to populate some of the other variables.

Providing general training for the variables and what reports they populate is outside the scope of Stack Overflow. If the documentation is too confusing then I suggest you enroll in some of the training courses Adobe offers. But, if you have a specific question about a specific variable that you are confused about, feel free to ask.




回答2:


<a href="#" onClick="s.tl(this,'o','tag_1');”>Menu link 1</a>

This makes some assumptions:

  1. Your Omniture object is named "s"
  2. You don't need any additional props and evars set

This method will surface data in the custom links report with tag_1, tag_2 etc as the line items.



来源:https://stackoverflow.com/questions/24515877/omniture-is-it-possible-to-count-number-of-clicks-per-special-tagged-link

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