Tuesday, April 23, 2024 10:14:36 AM
dataLayer.push({
'UserType': '%AccessControlGroupName%'
.....
.....
.....
});
var item_discounts_applied_list = [];
item_discounts_applied_list.push(
{ id: %sku%, discount_type: %output 'percent' or 'dollar'%} discount_code: '%applied_code%', discount_amount: %the calculated $ value of the discount regardless if type was $-off or %-off%},
.....,
.....
);
var order_discounts_applied_list = [];
order_discounts_applied_list.push(
{ id: %orderid%, discount_type: %output 'percent' or 'dollar'%, discount_code: '%applied_code%', discount_amount: %the calculated $ value of the discount regardless if type was $-off or %-off%,
.....,
.....
);
dataLayer.push({
.....,
.....,
'ItemDiscountsApplied': item_discounts_applied_list,
'OrderDiscountsApplied': order_discounts_applied_list,
.....,
.....,
});
dataLayer.push({
.....,
.....,
'OrderDiscountsApplied': order_discounts_applied_list,
.....,
.....,
});