MetafieldsGoogle Merchant Fields

Google Merchant Fields

PromoSync fills in the Google Shopping attributes Google Merchant Center asks for (category, brand, condition, age group, gender, GTIN, MPN and more) from supplier data, so you don’t have to type them per product. They are written as metafields in the mm-google-shopping namespace, the namespace Shopify’s Google & YouTube app reads.

{% raw %}{{ product.metafields['mm-google-shopping'].brand }}
{{ product.metafields['mm-google-shopping'].condition }}
{{ variant.metafields['mm-google-shopping'].gtin }}{% endraw %}

The namespace has hyphens, so use bracket notation in Liquid.

Plan eligibility

Google Merchant fields are part of the PromoSync Merchandising bundle. On the PSRESTful plans:

PlanGoogle Merchant fields written?
FreeNo
StandardNo
PremiumWith the Merchandising add-on
BusinessYes
EnterpriseYes
TrialYes, for the duration of the trial

PSRESTful tells PromoSync whether your account has the bundle. When the Trial ends on a plan without it, PromoSync stops writing these fields. The PromoSync team can also turn the feature on for a single shop; there is no setting for it in the app.

To change your plan, visit psrestful.com/pricing.

Choosing Which Fields Are Written

In PromoSync, open Settings and pick SEO Fields in the sidebar. Tick the fields you want and click Save Settings. If no field is ticked, PromoSync writes all of them. Changes apply to products synced after you save.

PromoSync Settings with the SEO Fields tab open in the sidebar, showing Product-Level Fields checkboxes such as Condition, Google Product Category and Brand, and Variant-Level Fields checkboxes such as Title, GTIN, MPN, Color and Size

Example with made-up data.

On a plan without the Merchandising bundle, the tab shows a notice instead of the checkboxes.

Product-Level Fields

google_product_category

The Google product category PSRESTful assigned to the product.

PropertyValue
Namespacemm-google-shopping
Keygoogle_product_category
Typesingle_line_text_field
{% raw %}{{ product.metafields['mm-google-shopping'].google_product_category }}
→ "Apparel & Accessories > Clothing > Shirts & Tops"{% endraw %}

condition

Always new.

PropertyValue
Namespacemm-google-shopping
Keycondition
Typesingle_line_text_field

brand

The brand, using PSRESTful’s standard spelling when it has one, else the supplier’s own.

PropertyValue
Namespacemm-google-shopping
Keybrand
Typesingle_line_text_field
{% raw %}{{ product.metafields['mm-google-shopping'].brand }}
→ "Bella + Canvas"{% endraw %}

identifier_exists

true when the product has a brand, false when it doesn’t.

PropertyValue
Namespacemm-google-shopping
Keyidentifier_exists
Typeboolean

adult

Always false.

PropertyValue
Namespacemm-google-shopping
Keyadult
Typeboolean

age_group

Target age group, from the supplier’s apparel style. adult when the supplier sends no apparel size.

PropertyValue
Namespacemm-google-shopping
Keyage_group
Typesingle_line_text_field

Google’s values: adult, kids, toddler, infant, newborn.

gender

Target gender, from the supplier’s apparel style. unisex when the supplier sends no apparel size.

PropertyValue
Namespacemm-google-shopping
Keygender
Typesingle_line_text_field

Google’s values: male, female, unisex.

material

The supplier’s primary material, on one line.

PropertyValue
Namespacemm-google-shopping
Keymaterial
Typesingle_line_text_field

size_system

Size system, from the country of origin. US when the country is missing or not in PromoSync’s list.

PropertyValue
Namespacemm-google-shopping
Keysize_system
Typesingle_line_text_field

Custom labels

PromoSync fills three custom labels with fixed values, so you can group products in Google Ads campaigns:

KeyValue
custom_label_0Supplier code (for example SanMar)
custom_label_1The product’s line name
custom_label_2The product’s main category

All custom labels are single_line_text_field. PromoSync leaves custom_label_3 and custom_label_4 empty, so they are yours to use.

Variant-Level Fields

These fields are attached to individual variants.

gtin

The supplier’s Global Trade Item Number (barcode), when the supplier sends one.

PropertyValue
Namespacemm-google-shopping
Keygtin
Typesingle_line_text_field
OwnerPRODUCTVARIANT

mpn

The supplier’s Part ID for the variant.

PropertyValue
Namespacemm-google-shopping
Keympn
Typesingle_line_text_field
OwnerPRODUCTVARIANT

title

<product title> - <size>. Without a size, PromoSync uses the variant’s description, then its Part ID, in place of the size.

PropertyValue
Namespacemm-google-shopping
Keytitle
Typesingle_line_text_field
OwnerPRODUCTVARIANT
{% raw %}{{ variant.metafields['mm-google-shopping'].title }}
→ "Unisex Jersey Tee - L"{% endraw %}

cost_of_goods_sold

The variant’s cost with the store currency, for Google’s cost of goods sold attribute. Update Prices also refreshes it.

PropertyValue
Namespacemm-google-shopping
Keycost_of_goods_sold
Typesingle_line_text_field
OwnerPRODUCTVARIANT
{% raw %}{{ variant.metafields['mm-google-shopping'].cost_of_goods_sold }}
→ "8.25 USD"{% endraw %}

color

The variant’s color, from the Preferred Color Field in your Product Display Settings, falling back to the other color field.

PropertyValue
Namespacemm-google-shopping
Keycolor
Typesingle_line_text_field
OwnerPRODUCTVARIANT

size

The variant’s label size from the supplier’s apparel data.

PropertyValue
Namespacemm-google-shopping
Keysize
Typesingle_line_text_field
OwnerPRODUCTVARIANT

Complete Field List

Product-Level Fields

KeyTypeValue
google_product_categorytextGoogle product category
conditiontextAlways new
brandtextBrand name
identifier_existsbooleantrue when there is a brand
adultbooleanAlways false
age_grouptextTarget age group
gendertextTarget gender
materialtextPrimary material
size_systemtextSize system
custom_label_0textSupplier code
custom_label_1textLine name
custom_label_2textMain category

Variant-Level Fields

KeyTypeValue
gtintextGlobal Trade Item Number
mpntextSupplier Part ID
titletextProduct title and size
cost_of_goods_soldtextVariant cost and currency
colortextVariant color
sizetextVariant size

PromoSync also creates definitions for product_type, pattern, size_type, custom_label_3, custom_label_4 and product_detail (product) and item_group_id (variant), but does not write values to them today. You can fill them yourself.

Shopify Google & YouTube App

These metafields are read by Shopify’s Google & YouTube app:

  1. Install Google & YouTube from the Shopify App Store
  2. Connect your Google Merchant Center account
  3. Your products sync to Merchant Center with the attributes PromoSync filled in

Troubleshooting

Missing Required Fields

If Google rejects products for missing data:

  1. Check whether the supplier provides it. Many promotional products have no GTIN
  2. Check that the field is ticked on the SEO Fields tab (or that no field is ticked, which means all)
  3. Run Update Metafields on the product after changing the SEO Fields selection

Feed Errors

ErrorCauseWhat to do
Invalid GTINChecksum failureVerify with the supplier
Missing brandSupplier sent no brandAdd the brand manually
Invalid categoryOld taxonomyCheck Google’s taxonomy updates