I want to resolve this: "This Product is missing a global identifier (e.g. isbn, mpn or gtin8)" for Google structured data. But Shopify does not have field MPN. Can i (and how to) set mpn to use first product tag? In my case there are three, first is vendor , second unique and represents manufacturers part number, third is type for category. Example: WesternDigital, WD5000BMVW, HDD
If you want to use certain tags for specific purposes, it helps to add a prefix to your tag, like "mpn-1234567890". Then in your rich snippets code, you can get it like this:
{%- for tag in product.tags -%}
{%- if tag contains 'mpn-' -%}
{%- assign productMPN = tag | remove: 'mpn-' -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
Rich snippet ld+json code...
"mpn": "{{ productMPN }}"
User | Count |
---|---|
25 | |
24 | |
22 | |
19 | |
13 |