Feed attribute
gtin
Global Trade Item Number
The gtin attribute is the globally unique barcode number a manufacturer assigns to a product, covering UPC, EAN, JAN and ISBN formats. Channels use it to match an item against the same product sold elsewhere, and on Shopify it comes from the variant's barcode field, which is optional in the admin and therefore frequently empty.
Specification
- Attribute
- gtin
- Data type
- Text
- Limit
- 8, 12, 13 or 14 digits
- Format
- Digits only, with no spaces, hyphens or other punctuation. Valid lengths are 8 (EAN-8), 12 (UPC-A), 13 (EAN-13, ISBN-13, JAN) and 14 (ITF-14). The final digit is a check digit calculated from the others, so a transposed digit produces a structurally invalid value that channels reject. Leading zeros are significant and must be preserved.
- Examples
-
000123456000129781234567897012345678905
Support by channel
How each channel treats gtin.
| Channel | Requirement | Field name | Notes |
|---|---|---|---|
| Google Shopping | Required in some cases | gtin | Required when the manufacturer has assigned one. Omit for genuinely custom goods. |
| Meta | Recommended | gtin | Improves matching and is required for some Shops surfaces. |
| Microsoft Advertising | Required in some cases | gtin | Expected together with brand unless mpn is supplied. |
| Optional | gtin | ||
| OpenAI | Optional | gtin | Exactly 8, 12, 13 or 14 digits including a valid check digit. Carry it as a string so leading zeros survive. |
Frequently asked questions
Where does the GTIN come from in Shopify?
It comes from the barcode field on each variant, under inventory in the variant editor. It is optional in Shopify and not validated there, so it is commonly blank, padded with spaces, or filled with an internal reference that is not a real GTIN.
What are the valid GTIN lengths?
Eight digits for EAN-8, twelve for UPC-A, thirteen for EAN-13, ISBN-13 and JAN, and fourteen for ITF-14. Anything else is structurally invalid. Leading zeros count towards the length and must not be stripped.
What if my products genuinely have no GTIN?
For custom, handmade or own-brand goods with no manufacturer-assigned barcode, supply brand and mpn instead, or set identifier_exists to no. That is a legitimate declaration. Using it to paper over barcodes you simply have not entered causes matching problems rather than solving them.
Why do my GTINs lose their leading zeros?
Almost always a spreadsheet. Opening a feed in Excel or Sheets coerces a numeric-looking string to a number and discards leading zeros, turning a valid twelve-digit UPC into eleven digits. Generating the feed directly from the catalogue avoids the round trip entirely.
Errors involving this attribute
- Missing value: GTIN The "Missing value: GTIN" issue means a channel believes a product has a manufacturer-assigned barcode but the feed did not supply one. On Shopify it almost always traces back to the variant barcode field, which is optional in the admin and therefore left empty across large parts of most catalogues.
- Invalid value: GTIN The "Invalid value: GTIN" error means the feed supplied a value in the gtin attribute that is not a structurally valid Global Trade Item Number. Unlike a missing GTIN this is usually a disapproval rather than a warning, because a wrong identifier matches the item to the wrong product rather than to none.
Related attributes
- mpn The mpn attribute is the part number a manufacturer uses to identify a product in its own catalogue, and it serves as the fallback identifier when an item has no GTIN. Unlike a GTIN it is only unique within one manufacturer, so it is meaningless to a channel unless the brand attribute is supplied alongside it.
- brand The brand attribute is the name of the brand a product belongs to, and it is what makes a manufacturer part number meaningful and a listing eligible for brand-based matching. On Shopify it maps most often from the vendor field, which is unreliable because merchants commonly use vendor to record a supplier or distributor rather than the consumer-facing brand.
- identifier_exists The identifier_exists attribute is an explicit declaration that a product has no manufacturer-assigned identifiers, set to no when a GTIN, MPN and brand genuinely do not exist for the item. It is a statement about the product, not a way to silence identifier warnings, and channels treat misuse as a data quality problem rather than a resolution.
Related concepts
Primary sources
Channel specifications change. These are the official documents this page is based on.