tag-manager icon indicating copy to clipboard operation
tag-manager copied to clipboard

Add Click Value as variable

Open Starker3 opened this issue 2 years ago • 4 comments

There currently isn't a way to get the value of a page element as a variable in the Tag Manager. For elements that don't have a text value this means that it's not possible to dynamically track the value of those elements in the Tag Manager.

This could be useful for things such as Checkboxes, Radio buttons, etc. that only have a value without any text set in the element directly and usually have a text element adjacent. For example you would normally have:

<input type="radio" value="0-25"><span>0-25</span>

Since only the checkbox is expected to be clicked, it won't be possible normally to get the value as a variable.

Starker3 avatar Jun 09 '22 03:06 Starker3

Or better (more flexible): define the attribute in which reading the value to track. Eg:

<div class="some-classes" my-own-attribute="I want to track it">...</div>

heurteph-ei avatar Jun 10 '22 11:06 heurteph-ei

This was requested today. A user writes:

we would like to track the entries/results in a feedback form. What solutions does Matomo offer for this?

image

atom-box avatar Jul 28 '23 16:07 atom-box

@atom-box how are they planning to track this requests ? On a form submit or whenever each checkbox is ticked ?

AltamashShaikh avatar Jul 31 '23 02:07 AltamashShaikh

@atom-box I had some customers with such needs. My solution was the use of one action custom dimension for each checkbox... (I activated the whole 60 custom dimension in Matomo server config...)

heurteph-ei avatar Aug 24 '23 15:08 heurteph-ei