Google Merchant Listings "Duplicate field "brand""

Hi guys, currently in the process of setting up my store on Google Merchant and resolved most errors except for this one. “Duplicate field brand”. I searched “brand” in all of my code in products and couldn’t find it anywhere. Anyone know the solution to fi

It’s possible that the structured data is listing the brand value correctly, and or in the incorrect section.

I recommend removing your existing code and use the one below.


{%- assign fa_product_id_alpha2_code = 'US' -%}

{%- assign fa_product_id = 'default' -%}

{%- assign fa_return_days = 28 -%}

{% if cart.currency.iso_code == 'USD' %}
    {%- assign fa_shipping_currency = "USD" -%}
    {% if fa_product_price >= "75" %}
        {%- assign fa_shipping_price = 0.00 -%}
    {%- else -%}
        {%- assign fa_shipping_price = 4.50 -%}
    {%- endif -%}
{%- endif -%}
{%- assign fa_shipping_handling_time_min = 0 -%}
{%- assign fa_shipping_handling_time_max = 1 -%}
{%- assign fa_shipping_shipping_time_min = 2 -%}
{%- assign fa_shipping_shipping_time_max = 5 -%}

{%- assign fa_returns = 'true' -%}
{%- assign fa_shipping = 'true' -%}

{%- if template contains 'product' -%}

{%- assign fa_current_variant = product.selected_or_first_available_variant -%}

{%- 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 | escape }}{%- endcapture -%}
{%- endif -%}

{%- if cart.currency.iso_code == 'GBP' or cart.currency.iso_code == 'USD' or cart.currency.iso_code == 'JPY' or cart.currency.iso_code == 'AUD' or cart.currency.iso_code == 'AED' or cart.currency.iso_code == 'CAD' or cart.currency.iso_code == 'BWP' or cart.currency.iso_code == 'BND' or cart.currency.iso_code == 'DOP' or cart.currency.iso_code == 'GTQ' or cart.currency.iso_code == 'HKD' or cart.currency.iso_code == 'INR' or cart.currency.iso_code == 'ILS' or cart.currency.iso_code == 'YEN' or cart.currency.iso_code == 'KES' or cart.currency.iso_code == 'KOR' or cart.currency.iso_code == 'LBP' or cart.currency.iso_code == 'MYR' or cart.currency.iso_code == 'MXN' or cart.currency.iso_code == 'NPR' or cart.currency.iso_code == 'NZD' or cart.currency.iso_code == 'NIO' or cart.currency.iso_code == 'NGN' or cart.currency.iso_code == 'PKR' or cart.currency.iso_code == 'CNY' or cart.currency.iso_code == 'PHP' or cart.currency.iso_code == 'SGD' or cart.currency.iso_code == 'LKR' or cart.currency.iso_code == 'CHF' or cart.currency.iso_code == 'TWD' or cart.currency.iso_code == 'TSH' or cart.currency.iso_code == 'THB' or cart.currency.iso_code == 'UGX' or cart.currency.iso_code == 'KWD' or cart.currency.iso_code == 'CLP' or cart.currency.iso_code == 'BHD' -%}
{%- assign fa_product_price = fa_current_variant.price | money_without_currency | remove:',' -%}
{%- else -%}
{%- assign fa_product_price = fa_current_variant.price | money_without_currency | remove:'.' | replace: ',', '.' -%}
{%- endif -%}

{%- endif -%}

Hey @orby

This is likely because you have two sets of structured data that are linking together and creating a duplicated brand field in the structured data. This is usually because a structured data app and your theme are using the same id. If you share a URL with the error, I can confirm that for you. Feel free to DM me if you prefer.

Hi! The “Duplicate field ‘brand’” error in GMC occurs when your product data has multiple brand fields. And this is possible in a case where you have multiple codes/scripts in your theme that are adding the brand information, resulting in duplicate values.

So, there are some steps using which you can fix this issue:

Edit Code in the Theme:

Check the code in your theme, especially in the “main product liquid file”.
There are high chances that the error might be originating from here.

Review and Modify JSON-LD Script:

Confirm the brand field is structured correctly in the JSON-LD script.
Make sure the brand value is not duplicated in the script.

Save the code changes, and you will be good to go.

Hope this helps. Good luck!

Hello,

it is recommended to set up only one schema for a store if you use Google Merchant Center to avoid conflicts.

Try using the schema markup testing tool: https://search.google.com/test/rich-results to detect all schemas on your site, and after that, remove all unnecessary schemas from your site.

You can also install a schema markup app for Google Merchant Center for the best experience.