Skip to content

Latest commit

 

History

History
10 lines (10 loc) · 682 Bytes

2021-12-05-fix-determination-of-product-id-and-name-of-ga-plugin.md

File metadata and controls

10 lines (10 loc) · 682 Bytes
Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 5 column 16
---
title: Fix determination of product id and name of GA plugin
issue: NEXT-19234 
author: Max
author_email: [email protected]
author_github: @aragon999
---

Storefront

  • Changed the selector of the Google Analytics ViewItemEvent (app/storefront/src/plugin/google-analytics/events/view-item.event.js), for the product id to [itemtype="https://schema.org/Product"] meta[itemprop="productID"] and for the product name to [itemtype="https://schema.org/Product"] [itemprop="name"] to also work for soldout products
  • Removed findProductId of the Google Analytics ViewItemEvent, use the value of [itemtype="https://schema.org/Product"] meta[itemprop="productID"] if needed