в GTM

CSS селекторы

SELECTOR DESCRIPTION
.thisclass Matches if element has class “thisclass”
.thisclass.thatclass Matches if element has class “thisclass” and class “thatclass”
#thisid Matches if element has ID “thisid”
#main .navlink Matches if element has class “navlink” and is a descendant of an element with the ID “main”
div#main > .navlink Matches if element has class “navlink” and is the direct child of a DIV element with the ID “main”
:checked Matches if element is checked (radio button or checkbox)
[data-title*=”chairman mao”] Matches if element has attribute “data-title” with the string “chairman mao” somewhere in its value
a[href$=”.pdf”] Matches if element is a link (A) with a HREF attribute that ends with “.pdf”
.contactmail:only-child Matches if element has class “contactmail” and is the only child of its parent

Источник: https://www.simoahava.com/analytics/matches-css-selector-operator-in-gtm-triggers/

 

Написать Комментарий

Комментарии