diff --git a/blocks/product-details/product-details.js b/blocks/product-details/product-details.js index 117d3ea587..e4bebdc741 100644 --- a/blocks/product-details/product-details.js +++ b/blocks/product-details/product-details.js @@ -148,6 +148,7 @@ class ProductDetailPage extends Component { if (!loading && product) { setJsonLdProduct(product); // TODO: productId not exposed by catalog service as number + // TODO: Add eventInfo window.adobeDataLayer.push({ productContext: { productId: 0, ...product } }, { event: 'product-page-view' }); } } diff --git a/blocks/product-list-page-custom/ProductList.js b/blocks/product-list-page-custom/ProductList.js index 94f657c829..f5815effc9 100644 --- a/blocks/product-list-page-custom/ProductList.js +++ b/blocks/product-list-page-custom/ProductList.js @@ -47,6 +47,7 @@ class ProductCard extends Component { } onProductClick(product) { + // TODO: Add eventInfo window.adobeDataLayer.push({ event: 'search-product-click', eventInfo: { searchUnitId: 'searchUnitId', sku: product.sku } }); } diff --git a/blocks/product-list-page-custom/product-list-page.js b/blocks/product-list-page-custom/product-list-page.js index 0a1d3a9ab9..bd0fb86536 100644 --- a/blocks/product-list-page-custom/product-list-page.js +++ b/blocks/product-list-page-custom/product-list-page.js @@ -195,11 +195,14 @@ class ProductListPage extends Component { } else { searchResultsContext.units[index] = searchResultUnit; } + // TODO: Add eventInfo dl.push({ searchResultsContext }, { event: 'search-response-received', eventInfo: { searchUnitId } }); if (this.props.type === 'search') { + // TODO: Add eventInfo dl.push({ event: 'search-results-view', eventInfo: { searchUnitId } }); } else { dl.push( + // TODO: Add eventInfo { event: 'category-results-view', eventInfo: { searchUnitId } }, { categoryContext: { diff --git a/blocks/product-recommendations/product-recommendations.css b/blocks/product-recommendations/product-recommendations.css index 8163a18129..00adc22cca 100644 --- a/blocks/product-recommendations/product-recommendations.css +++ b/blocks/product-recommendations/product-recommendations.css @@ -70,7 +70,6 @@ main .section>div.product-recommendations-wrapper { .product-recommendations .product-grid-item { margin: 0; - width: 65vw; scroll-snap-align: start; } diff --git a/scripts/commerce.js b/scripts/commerce.js index 7e4622939d..e26c8a2040 100644 --- a/scripts/commerce.js +++ b/scripts/commerce.js @@ -341,6 +341,7 @@ export async function getProduct(sku) { // You can get this list via attributeMetadata query export const ALLOWED_FILTER_PARAMETERS = ['page', 'pageSize', 'sort', 'sortDirection', 'q', 'price', 'size', 'color_family']; +// TODO: Move to custom block, since not needed anymore export async function loadCategory(state) { try { // TODO: Be careful if query exceeds GET size limits, then switch to POST @@ -394,6 +395,7 @@ export async function loadCategory(state) { } else { searchInputContext.units[index] = unit; } + // TODO: Add eventInfo dl.push({ searchInputContext }, { event: 'search-request-sent', eventInfo: { searchUnitId } }); }); diff --git a/scripts/minicart/cart.js b/scripts/minicart/cart.js index f4aedbb012..6735568045 100644 --- a/scripts/minicart/cart.js +++ b/scripts/minicart/cart.js @@ -241,6 +241,7 @@ export async function addToCart(sku, options, quantity, source) { // TODO: Find exact item by comparing options UIDs const mseChangedItems = cart.items.filter((item) => item.product.sku === sku).map(mapCartItem); + // TODO: Add eventInfo window.adobeDataLayer.push( { shoppingCartContext: mseCart }, { changedProductsContext: { items: mseChangedItems } },