Skip to main content
Solved

Added to Cart Flow (ATC metric) pricing event


Forum|alt.badge.img+4

Hey

One of my ATC flows is pulling across the pricing as per below - I copied the event (highlighted where the cursor is hovering) does anyone know why it’s appearing like this?

 

Price: <span class=money>240.00 AED</span>

 

Thanks so much

Best answer by kaila.lawrence

Gotcha! Easy fix then -- in your tag, replace default with safe and that should clear it up! 

 

{{ event.Price|safe }}

View original
Did this topic or the replies in the thread help you find an answer to your question?

7 replies

kaila.lawrence
Community Manager
Forum|alt.badge.img+31
  • Community Manager
  • 498 replies
  • February 21, 2024

Hey @stephanie_bloomdollar! To confirm, the Added to Cart metric is working properly, it’s just the price that isn’t appearing correctly?


Forum|alt.badge.img+4

Yes that’s correct just the price isn’t showing. Thanks


kaila.lawrence
Community Manager
Forum|alt.badge.img+31
  • Community Manager
  • 498 replies
  • Answer
  • February 21, 2024

Gotcha! Easy fix then -- in your tag, replace default with safe and that should clear it up! 

 

{{ event.Price|safe }}


Forum|alt.badge.img+4

Ok great thanks so much - just so I understand do you know why it needs replacing with safe? Thank you!


kaila.lawrence
Community Manager
Forum|alt.badge.img+31
  • Community Manager
  • 498 replies
  • February 22, 2024

Sure thing! So adding a "safe" filter to that variable will remove any HTML that is being attached to the data. Sometimes the HTML around the price will also get pulled in from the web tracking snippet, and this filter is way easier than changing the HTML on your site. 


Murray Finlayson
Contributor IV
Forum|alt.badge.img+5

I have encountered the exact same problem.

I tried the exact same proposed solution. But it does not work.

In fact, it caused the Preview to throw an error...

Same problem with the ‘Viewed product’ metric for Browse Abandonment.

 

Not happening in Abandoned Checkout however, because it uses a different variable in the Event info.



 


Murray Finlayson
Contributor IV
Forum|alt.badge.img+5

Actually, I believe the correct variable is...

{{ event.Price|default:''|safe }}

 

Not this…

{{ event.Price|safe }}


Reply