Element g:id

Basic information

This is a unique product identifier in the feed. It is mandatory for Google Shopping. Google recommends using SKU codes from your system as g:id values, as they are unique.

It can contain a maximum of 50 characters, and the following can be used in g:id values: lowercase and uppercase letters without diacritics, numbers, hyphens, and underscores.

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

  • g:item_group_id - common identifier for product variants (group ID)
  • g:gtin - numeric code identifying products (e.g., EAN)
  • g:mpn - manufacturer part number (MPN) (Manufacturer Part Number)

FAQ

  • Can g:id be duplicated in the feed, i.e. the same for multiple products?
    • No, g:id must be unique for each product, otherwise Google Merchant Center will reject products with duplicate g:id and they will not appear in the campaign.
    • How to find and hide products with duplicate values in g:id is described in the guide [How to find duplicate values](Najděte a odstraňte duplicitní produkty pomocí Mergada | Mergado.cz ~:text=Jak%20naj%C3%ADt%20duplicitn%C3%AD%20hodnoty,pro%20se%C5%99azen%C3%AD%20po%C4%8Dtu%20v%C3%BDskyt%C5%AF%20sestupn%C4%9B.)
  • What if I don’t have g:id in the feed, can it be corrected in Mergado?
    • Yes, using a rule of the type Rewrite you can fill in the Mergado system variable named @MERGADO_IDinto the g:id element, which contains a unique number for each product. This will give you unique values for each g:id.
    • Other possible solutions are:
  • What is the difference between g:id and g:item_group_id?
    • g:id must be unique for each product, while values in g:item_group_id can be the same (duplicate) for variants of the same product. g:item_group_id is a common identifier for product variants.
  • How to filter products with specific g:id values?
    • Simply create a selection of g:id values in Mergado on the Products page using a list, i.e. with the condition “is included in the list”. For more information, see our blog article Use product query using a list .

Help with the g:id element

If you have any further questions about the g:id element, please post your question below in the thread or send it to technical support email.

What Mergado Audit checks for the g:id element

  • Whether the g:id element is missing or empty for products.
  • Whether the g:id element has the correct length (maximum 50 characters) and does not contain any unauthorized values (authorized values are expressed by a regular expression: [_-0-9a-zA-Z], i.e.: underscores, hyphens, numbers, and lowercase and uppercase letters without diacritics. Therefore, there should be no spaces or letters with diacritics in g:id.)

:bulb: Try Mergado Audit XML feed for Google Shopping and if any of these g:id element errors apply to you, you can fix the feed for Google Shopping in Mergado Editor.

:ring_buoy: If you need help, just contact our technical support.