Skip to main content
Contributor I
February 20, 2024
Solved

Added to Cart Flow (ATC metric) pricing event

  • February 20, 2024
  • 7 replies
  • 181 views

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

This topic has been closed for replies.
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 }}

7 replies

kaila.lawrence
Community Manager
Community Manager
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?

Contributor I
February 21, 2024

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

kaila.lawrence
Community Manager
Community Manager
February 21, 2024

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

 

{{ event.Price|safe }}

Contributor I
February 22, 2024

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

kaila.lawrence
Community Manager
Community Manager
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
May 16, 2024

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
May 20, 2024

Actually, I believe the correct variable is...

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

 

Not this…

{{ event.Price|safe }}