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
?
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.
This makes some assumptions:
This method will surface data in the custom links report with tag_1, tag_2 etc as the line items.