You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported by one user in the support forums, when we're recording add_to_cart events within Site Kit for WooCommerce products (via Enhanced Conversion Tracking), decimal points are being ignored. For example, a price of 1.99 is being passed with a price of 199.
I have been able to reproduce this on a couple of test sites, testing via dev tools and tagassistant.google.com.
We are using a get_formatted_price function without our codebase, which could be reviewed.
The user mentioned this occurs variable type products, although I can reproduce the behavior on single set priced items also. See the recording below. There is a standard priced item, costing 543,210.99. This appears without decimal points, as 54321099.
Bug Description
As reported by one user in the support forums, when we're recording
add_to_cartevents within Site Kit for WooCommerce products (via Enhanced Conversion Tracking), decimal points are being ignored. For example, a price of 1.99 is being passed with apriceof 199.I have been able to reproduce this on a couple of test sites, testing via dev tools and tagassistant.google.com.
We are using a
get_formatted_pricefunction without our codebase, which could be reviewed.site-kit-wp/includes/Core/Conversion_Tracking/Conversion_Event_Providers/WooCommerce.php
Line 357 in 4946f1a
The user mentioned this occurs variable type products, although I can reproduce the behavior on single set priced items also. See the recording below. There is a standard priced item, costing 543,210.99. This appears without decimal points, as 54321099.
The recording below demonstrates the price ignoring the decimal points on a tastewp site (variable price product).
https://github.com/user-attachments/assets/7ccd7c26-830c-4b2d-9a34-a9c4a3e57a1f
The recording below demonstrates the price ignoring the decimal points on sample test site. (set price product).
5d2c5cc7-f586-4d9e-9b0e-9b71f9c2dc7d.webm
Steps to reproduce
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Test Coverage
QA Brief
Changelog entry