fix(payments): Adjust price and value for GA4 reports

This commit is contained in:
Lisa Chan 2024-01-02 12:35:12 -05:00
Родитель e3fb98be4a
Коммит d3357de539
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9052E177BBC5E764
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -67,9 +67,14 @@ export const ReactGALog = {
product_name: productName,
} = plan;
// Currently, only currencies with decimals are supported in Subscription Platform.
// If currencies without subunits (e.g., cents) are included at a later time, this
// will need to be updated.
const planPrice: number = (amount || 0) / 100;
let planOptions: PlanOptionsProps = {
currency: currencyCode,
value: amount,
value: planPrice,
payment_type: paymentType,
items: [
{
@ -77,7 +82,7 @@ export const ReactGALog = {
item_name: planName,
item_brand: productName,
item_variant: interval,
price: amount,
price: planPrice,
discount,
},
],