Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
Do anyone know how to resolve this issue in the Google Search Console: "No global identifier provided (e.g., gtin, mpn, isbn)"? We use Debut theme.
Thanks!
Solved! Go to the solution
This is an accepted solution.
@EmmanuelFlossie, I found your article: https://feedarmy.com/kb/shopify-microdata-for-google-shopping/
Can you please advice? If I'll add the line (colored in red) shown below in the code to the Debut theme product.liquid template will it solve the issue? Thanks!
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"@id": {{ canonical_url | append: '#product' | json }},
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_media -%}
{%- assign media_size = product.featured_media.preview_image.width | append: 'x' -%}
"image": [
{{ product.featured_media | img_url: media_size | prepend: "https:" | json }}
],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
"gtin12": {{ current_variant.barcode | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Brand",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }}
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}
</script>
@Irenagtin, mpn, isbn are different barcode formats, so it's telling you that it can't find barcodes for those products. Have you added barcodes to the barcode field?
It is just a warning, not an error as such, so if your products don't have barcodes then that's fine. This only really comes into play if you intend on using Google Shopping, Amazon, eBay etc.
Yes, we added barcodes (UPC's) to the barcode fields. That's why I am curious why we are getting this error. We were manage to fix other errors in Google Search Console like "Brand" just by fixing the code, however we still haven't found the solution for the "No global identifier provided (e.g., gtin, mpn, isbn)" error. Shopify support also doesn't know how to do that.
@Irena Just checked a Debut based site with this tool https://search.google.com/test/rich-results and looks like debut doesn't output the GTIN field as structured data by default, so more code changes are required if it bothers you (as I said it's a warning, not an error).
There is an article here that talks you through how to fix it https://feedarmy.com/kb/shopify-microdata-for-google-shopping/
This is an accepted solution.
@EmmanuelFlossie, I found your article: https://feedarmy.com/kb/shopify-microdata-for-google-shopping/
Can you please advice? If I'll add the line (colored in red) shown below in the code to the Debut theme product.liquid template will it solve the issue? Thanks!
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"@id": {{ canonical_url | append: '#product' | json }},
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_media -%}
{%- assign media_size = product.featured_media.preview_image.width | append: 'x' -%}
"image": [
{{ product.featured_media | img_url: media_size | prepend: "https:" | json }}
],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
"gtin12": {{ current_variant.barcode | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Brand",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }}
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}
</script>
UPDATE: I just tried out my suggested solution from above and the error on GSC disappeared, so I guess it works.
Glad my article could help, and yes as long as you have barcodes, that line of code is correct.
I have GTIN error and MCN error with google as well. Where do you get the GTIN and MCN for Aliexpress products? I looked over all of Oberlo and Aliexpress and can not find them on any products that I import to my store. Please help so I can get my store unblocked from S.E. like Google and Bing.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024