Extracting XPath for Goal events

To discover the page element XPath, you need to tell CUX which HTML element you have in mind. We’ll need the element class or ID that’s part of HTML attributes.

  1. Navigate to the page on your site.
  2. Find the element you want to track in your Goal.
  3. Right-click the element.
  4. Use the “Inspect” or “Inspect element” function. This opens the developer tools window or pane. In the developer tools window, a part of the HTML code that represents the chosen element is selected.inspect page cux.io
Extracting xPath

Extracting XPath for Goal events

  1. Copy the HTML element class or ID.
  2. Paste the copied value in the XPath field of the Goal creator. After a short moment, CUX shows you suggestions for the XPath.
  3. Select the option. CUX automatically enters the XPath value into the field.

That’s all you need to do!

 

Related articles

Building your custom Goals
Goal events