Element g:gtin#

Basic information#

The g:gtin element contains the numeric code identifying the product. GTIN (Global Trade Item Number) varies by product type. Most commonly, the g:gtin element contains the EAN code of the product; for books, it contains the ISBN code.

Google Shopping supports g:gtin values with lengths of: 8, 12, 13, or 14 digits. The g:gtin can also be empty (0 characters) if the product has no identifier.

Elements related to g:gtin that can also be used in the feed:

  • g:mpn — Manufacturer Part Number (MPN)
  • g:brand — product brand or manufacturer
  • g:identifier_exists — used when no unique product identifier is available in g:gtin, g:mpn, or g:brand

Frequently asked questions#

  • Is the g:gtin code required for products?
    • Yes, when the product has been assigned a unique identifier (e.g. UPC code, EAN, ISBN).
    • If the product has no unique identifier (e.g. it is a custom item with no EAN/UPC/ISBN code, no manufacturer part number g:mpn, and no brand g:brand), g:gtin is not required. However, you must use the g:identifier_exists element with the value false or no to indicate that the product has no unique identifiers.
  • How do I populate the g:gtin element with a value from another element?
    • Use the Bulk copy values rule to copy the value from another element — for example, from the EAN element to g:gtin.
    • You can also use the Rewrite rule to save the value of another element (a variable) into g:gtin, for example: %EAN%.
  • What if I manufacture products myself and have no unique identifier?
    • If you have no g:gtin (EAN/UPC/ISBN/…), no g:mpn, and no brand g:brand, you must use the g:identifier_exists element and set it to false or no.
    • Note: consider obtaining your own EAN code by registering with an EAN issuing service — basic information is available in the article What is an EAN code and where is it useful?.
  • Can I hide products with a missing g:gtin in Mergado?
    • Yes. Create a query to find such products and apply the Hide product rule to it. You can also use the pre-built automation Hide products with a missing EAN code. Before running the automation, select g:gtin in the element field.
  • Can I find products with an invalid g:gtin (e.g. wrong length or containing non-numeric characters) in the feed?
    • Yes, using the pre-built Find products with an invalid EAN automation — just run it. It creates a query of products where g:gtin does not have the correct length or contains non-numeric characters. Before running, select g:gtin in the element field.
  • How do I filter products by g:gtin codes in Mergado?
    • By creating a query on the Products page, for example:
      • g:gtin =<specific number>”, or
      • g:gtin contains<specific number>”, or
      • if you want to find products by multiple g:gtin codes, use the enumeration query.
  • How do I find duplicate g:gtin codes?
  • Can I filter out products with duplicate g:gtin codes in Mergado?
    • Yes. When importing into Mergado, set the matching elements to g:gtin only. Products with duplicate g:gtin codes will then not be imported into Mergado — they will be removed during input feed import.

What Mergado Audit checks for the g:gtin element#

  • Whether g:gtin is missing or empty for any products, in relation to the g:mpn and g:identifier_exists elements.
  • Whether g:gtin codes are unique and no duplicate values (i.e. the same g:gtin code for multiple products) appear in the feed.
  • Whether the g:gtin element contains any invalid value — values containing letters or other non-numeric characters are not permitted.
  • Whether the g:gtin element has the correct length.

If you need help, contact our technical support.

Was this article helpful?