Hi All Shopify Gurus!
Just wondered if there was an elegant solution to the following missing fields issues on my product pages. (see screenshot)
https://charactertoystore.com/collections/julia-donaldson-soft-toys/products/gruffalo-squirrel
I have the Supply theme. Could the below issues be hurting my SEO rankings?
Appreciate your expertise.
Thanks
Stephanie 
Do your products actually have SKU/GTIN defined? If they are missing from shopify admin, then not surprising fields missing in schema, even if the code is there to output the fields.
aggregateRating field is for a product rating average score from reviews you collect. If you donāt have reviews I mean technically there are ways to āfakeā this but I would not recommend it. More robust to genuinely collect reviews and display them onsite in this field.
priceValidUntil is really intended for discounts, but one approach to avoid the warning is to have it set to today + 1year. Depends on your overall discounting strategy and honestly not sure of any cases where this has been robustly tested in isolation, so who knows what impact this would have. Iād guess itās so Google can choose to show ā$xx.xx until DD/MM/YYā in the SERP, but I havenāt seen them using that.
Usually Iād recommend either:
-
Getting a good review app and then replacing your theme schema* with that from an app called āJSON-LD for SEOā by LittleStreamSoftware. That is usually āgood enoughā for most stores. That needs minimal config/dev work to get setup correctly.
-
Advanced: If you really need more customization than that (I doubt it), pay a dev to build a fully custom implementation of JSON-LD to fit your needs.
- most Shopify themes come with a minimal built in schema, you may want to get a dev to rip this out of the theme. Having dupe schema is not necessarily an issue for SEO if the data is the same, but it can cause issues with Shopping Feed conflicts and other edge cases.
1 Like
Go to your theme and edit code
Go to section ā product-template.liquid
Find this code:
Then paste this code below it:
This will fix url and priceValidUntil.
- For review and aggregateRating, you have to go to app and install product reviews then follow their instruction. Once there is review for your product then there will be value for it.
- For sku and global identifier, you can follow the step below:
-
Find this code at the topmost of product-template.liquid:
-
Paste this code under the code above(1)
{% assign fa_product_id_alpha2_code = āUSā %}
{% assign fa_prices_with_decimal_separator = true %}
{% assign fa_product_id = ādefaultā %}
{%- assign fa_current_variant = product.selected_or_first_available_variant -%}
{%- assign fa_variant_count = product.variants | size -%}
{%- assign fa_count = 0 -%}
{%- if fa_product_id == ādefaultā -%}
{%- capture fa_product_id_value -%}shopify_{{ fa_product_id_alpha2_code }}{{ product.id }}{{ fa_current_variant.id }}{%- endcapture -%}
{% elsif fa_product_id == āproduct_idā %}
{%- capture fa_product_id_value -%}{{ fa_current_variant.id }}{%- endcapture -%}
{% elsif fa_product_id == āparent_idā %}
{%- capture fa_product_id_value -%}{{product.id }}{%- endcapture -%}
{% elsif fa_product_id == āskuā %}
{%- capture fa_product_id_value -%}{{ fa_current_variant.sku }}{%- endcapture -%}
{% endif %}
- edit the second step code:
fa_product_id_alpha2_code Change the āUSā to your country code based on this: https://help.shopify.com/en/api/custom-storefronts/storefront-api/reference/enum/countrycode
If youāre in the US, then keep fa_prices_with_decimal_separator to true, if you are in a European country then change it to false.
The following step requires you to check the product id in Google Merchant Center > Products > List. And see what ID you are using.
- If it looks like shopify_US_81191654332_1055121650148, then keep fa_product_id set to default
- If it looks like 1055121650148 then set the value fa_product_id to product_id
- If it looks like the main id 81191654332 then set the value fa_product_id to parent_id
- If it looks like a sku then set the value fa_product_id to sku
(if you donāt know then just keep it default)
- Then paste this code under the edited second step code:
{%- if product.variants.first.barcode.size == 12 -%}
{%- endif -%}
{%- if product.variants.first.barcode.size == 13 -%}
{%- endif -%}
{%- if product.variants.first.barcode.size == 14 -%}
{%- endif -%}
I hope this will help you out.
2 Likes