Visual selection of page element, navigate to parent, build XTag Selector (for XTagManager and Schneider Electric Tag Manager)
XTag Selector allows to visually select any element in page and navigate to its parent when necessary. Then it builds a selector usable in XTagManager or Schneider Electric Tag Manager configurators.
• To enable/disable XTag Selector, click the toolbar icon.
• With the green selector, hover any element you want to select in current page.
• If you can't select the proper area, then select one of its content and click on [Select parent] until you've selected what you want.
• Right click on highlighted element, then choose the selector type:
► For Link(s) tracking: to select a set of <a> elements. If there's no <a> node in your selection, you'll be alerted.
► For Action tracking: to setup a click tracking with non-link elements, like button. To be used when previous option says there's no link.
► For Value extraction: to select text or number inside the selection, used for example by sales tracking (for this usage, if you are ony interested by number, you don't have to worry about currency or local separators, it will be properly formatted).
► For Area selection: to select anything. Useful for clickzone or search areas for example.
• The selector will be copied in clipboard and displayed on page until the next selection. You can also see it in Chrome console.
• To deactivate, click again on toolbar icon, on X-Selector tip at top-left corner, or type on Esc key, or switch on another tab.
XTag Selector node syntax is a simplification of XPath, but only selects significant ascendants, and choose them in a particular way, in order to be resistant to structure changes:
• ParentNode/ChlidNode/.../MyNode, where a Node can be:
► id or @id : id of node
► tagName:className[index] : select tag with type and class (can be empty to retrieve all)
DIV:row >> Select all DIV with class 'row', or only the first when ascendant.
DIV:row >> Select fourth DIV with class 'row'
A:cta* >> Select all nodes with a class name containing 'cta".