fix: order creation

This commit is contained in:
2025-12-08 00:24:19 +03:00
committed by Nikita Kiselev
parent 4a3dcc11d1
commit 82ab8134e1
13 changed files with 164 additions and 96 deletions

View File

@@ -64,6 +64,11 @@ export const useCheckoutStore = defineStore('checkout', {
const pulse = usePulseStore();
await nextTick(() => {
pulse.ingest(TC_PULSE_EVENTS.ORDER_CREATED, {
order_id: this.order.id,
revenue: this.order?.final_total_numeric,
currency: this.order?.currency,
});
yaMetrika.reachGoal(YA_METRIKA_GOAL.ORDER_CREATED_SUCCESS, {
price: this.order?.final_total_numeric,
currency: this.order?.currency,
@@ -88,11 +93,6 @@ export const useCheckoutStore = defineStore('checkout', {
}
}
});
pulse.ingest(TC_PULSE_EVENTS.ORDER_CREATED, {
order_id: this.order.id,
revenue: this.order?.final_total_numeric,
currency: this.order?.currency,
});
});
await window.Telegram.WebApp.HapticFeedback.notificationOccurred('success');