Solved

Capturing values on order confirmation page

  • 4 August 2023
  • 3 replies
  • 60 views

Badge +1

Hi Community!

 

New to Heap and I feel silly asking this question since it’s probably obvious. I’ve been reading through other posts and documents, yet still falling short. I’m trying to capture data on the order confirmation page - shipping charges, sub-total, and grand total. 


I believe snapshot properties are appropriate and have created a event to record the transaction. whenever the order confirmation page is hit and that’s working fine.

 

Then added snapshot properties as seen below

Should I be using the xpath to define the element or some other selector? Thanks in advance and sincerely apologize if this question has been answered already.

icon

Best answer by Christy H 4 August 2023, 19:17

View original

3 replies

Userlevel 4
Badge +3

@b2b_ecomm_guy ,

Thanks for your question… and no apologies needed 😀.  Unfortunately, we don't currently support XPATH in our definitions. Are there other CSS elements that you can use to identify the desired elements?

Badge +1

@Christy H ,

there are, but they can change. XPATH is the most reliable. Which selectors are supported in the definitions? thanks

Userlevel 4
Badge +3

@b2b_ecomm_guy ,

Heap supports most of the standard CSS selectors such as classes, ids, tags, aria labels, etc. You can find some more detailed information in this doc here

If your site is using react (or another framework with dynamic ids) you may find some helpful tips in these 2 articles. Using Heap with React Websites or React Styling Libraries & DOM Minification.

If you are still having trouble, our support team may be able to take a look at your sites code to help determine the best selectors. You can contact them via the Get support page if needed.

Reply