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

Add Click Name to trigger conditions

Open Starker3 opened this issue 4 years ago • 1 comments

Currently we have several different options of setting up a trigger, but we don't currently have a trigger that can be used for a page elements "name" attribute.

For example, the following in an HTML page: <a href="/my-link/here" target="_self" class="classes" name="specific_element_name"> <h2 class="other-classes">This is an H2 link </h2> </a>

Using a trigger of Click Element contains specific_element_name doesn't seem to work to trigger on this element for a All Links Click trigger. Using a Click Class contains classes or Click Text contains This is an H2 link works to trigger the All Links Click but I couldn't find a way to trigger using the specific_element_name attribute of this page element.

Starker3 avatar Oct 21 '21 22:10 Starker3

The Click Element of the trigger should work in this case with the CSS selector -> a[name="specific_element_name"]

peterbo avatar Feb 11 '22 11:02 peterbo