diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 74b74283b..f5a7d10e0 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -221,7 +221,7 @@ export default { ? order?.serviceLocation?.provider?.address?.zipCodeCtu : order?.serviceLocation?.zipCodeCtu; label.subTotalPrice = getSubTotal(order?.lineItems); - label.totalPrice = getAmountDue(order?.lineItems); + label.totalPrice = getAmountDue(order?.lineItems, true); await this.pushEventToGA( GaCategories.FMG_SESSION_DATA, @@ -237,9 +237,16 @@ export default { (lineItem) => lineItem.partType == partTypeStrings.EARLY_BIRD ); + const promoCodes = Array.isArray(order?.lineItems?.promos) + ? order?.lineItems?.promos + .map((item) => item.promoCode) + .filter((code) => code) + .join(", ") + : ""; + label = {}; label.serviceType = order?.serviceLocation?.appointmentType; - label.promoCodes = order?.lineItems?.promos; + label.promoCodes = promoCodes; label.hasTechnicianNotes = order?.serviceLocation?.techNotes ? true : false; label.paymentMethod = order?.payment?.piaType; label.isTextingOptedIn = order?.customer?.isSmsOptIn ? true : false;