# Element g:id

**URL:** <https://forum.mergado.com/t/element-g-id/1190>\
**Category:** Google Shopping and Mergado\
**Tags:** google-shopping, elements, g:id\
**Created:** [August 13, 2025, 8:46am UTC](https://forum.mergado.com/t/element-g-id/1190 "2025-08-13T08:46:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veronika\_kusalikova](https://forum.mergado.com/user_avatar/forum.mergado.com/veronika_kusalikova/32/430_2.png) [@veronika\_kusalikova](https://forum.mergado.com/u/veronika_kusalikova)\
**Post date:** [August 13, 2025, 8:46am UTC](https://forum.mergado.com/t/element-g-id/1190/1 "2025-08-13T08:46:46Z")

</div>

## 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.

- [Specification of the g:id element in Google Merchant Center help](https://support.google.com/merchants/answer/6324405?hl=cs)

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

- [g:item\_group\_id](https://support.google.com/merchants/answer/6324507?hl=cs) - common identifier for product variants (group ID)
- [g:gtin](https://forum.mergado.cz/t/element-g-gtin/2837) - numeric code identifying products (e.g., EAN)
- [g:mpn](https://forum.mergado.cz/t/element-g-mpn/2841) - 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](https://www.mergado.cz/najdete-a-odstrante-duplicitni-produkty-pomoci-mergada#:) ~: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](https://forum.mergado.com/t/rewrite/491)_ you can fill in the Mergado system variable named `@MERGADO_ID`into 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:
    - products with missing `g:id` [hide using a hiding rule](https://forum.mergado.com/t/hide-product/486) or
    - values into `g:id` [import using a Data file import rule](https://www.mergado.com/blog/csv-import-rule) or
    - if you have values for `g:id` in another element, such as `SKU`, then you can copy them to `g:id` using the _Bulk copy values_ rule.

- **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](https://forum.mergado.com/t/how-to-work-with-product-queries-in-mergado/1193) .

## 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](https://www.mergado.com/contact).

## 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](https://forum.mergado.com/t/basic-overview-of-regular-expression-tags/756): [\_-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`.)

💡 Try [Mergado Audit XML feed for Google Shopping](https://audit.mergado.com/) and if any of these `g:id` element errors apply to you, you can fix the feed for Google Shopping in **Mergado Editor**.

🛟 If you need help, just contact our [technical support](https://www.mergado.com/contact).
