- [Case Studies](https://www.mergado.com/category/case-studies)
- [eCommerce tips](https://www.mergado.com/category/ecommerce-tips)
- [Online Store Solutions and Platforms](https://www.mergado.com/category/online-store-solutions-and-platforms)
- [Mergado Pack](https://www.mergado.com/category/mergado-pack)
- [Mergado tips](https://www.mergado.com/category/mergado-tips)
- [Mergado News](https://www.mergado.com/category/mergado-news)
- [eCommerce News](https://www.mergado.com/category/ecommerce-news)
- [How to use Mergado](https://www.mergado.com/category/how-to-use-mergado)
- [Interviews with e‑commerce gurus](https://www.mergado.com/category/interviews-e-commerce-gurus)
- [Extensions](https://www.mergado.com/category/apps-bidding-image-marketing-and-more)
- [Expansion with Mergado](https://www.mergado.com/category/expansion-with-mergado)
- [Mergado Lifestyle](https://www.mergado.com/category/mergado-lifestyle)
 



 

 1. [  Home  ](https://www.mergado.com/)
2. [     Mergado Blog  ](https://www.mergado.com/blog)
3. [     eCommerce News  ](https://www.mergado.com/category/ecommerce-news)
4. <a class="flex items-center gap-2 hover:underline" href="" itemid="" itemprop="item" itemscope="" itemtype="https://schema.org/Thing">    **Customize Google and Facebook formats to their current specifications** </a>
 
  

 

#  **Customize Google and Facebook formats to their current specifications** 

 

 

 [    ![](https://www.mergado.com/sites/default/files/perm/user-avatar/23021961102131189073595481259913287n.jpg)   Lukáš Horák  ](https://www.mergado.com/blog/lukas-horak) [eCommerce News](https://www.mergado.com/category/ecommerce-news) 

1. 9. 2020

2 minutes read

 

 

 

 

 

  ![Customize Google and Facebook formats to their current specifications](https://www.mergado.com/sites/default/files/field/image/gfb-specication-en.png)  

[Google](https://www.mergado.com/tag/google-shopping) and [Facebook](https://www.mergado.com/tag/facebook) have added new elements to their specifications in recent months without any notification. As a result, in Mergado, these elements **were not automatically hidden** in projects that had the Google or Facebook format on input.



 

 

 
                function tableOfContents() {
                  return {
                    headings_menu: [],
                    heading_active: '', // Added to track the active section
                    shouldBeSticky: false,

                    generateToC() {
                      const headings = document.querySelectorAll('.js-article-full-headings h2, .js-article-full-headings h3');
                      let headingMap = {};

                      headings.forEach((heading) => { // Use an arrow function to maintain `this` context
                        // Normalize heading text to remove diacritics, then replace non-alphanumeric characters with dashes
                        var normalizedText = heading.textContent.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); // Remove diacritics
                        var id = heading.id ? heading.id : normalizedText.trim().toLowerCase()
                          .split(' ').join('-').replace(/[^a-z0-9\-]/ig, ''); // Updated regex to replace non-alphanumeric characters
                        headingMap[id] = headingMap[id] !== undefined ? ++headingMap[id] : 0;

                        // Use the updated `id` with diacritics removed for the heading id and the TOC
                        const finalId = headingMap[id] ? `${id}-${headingMap[id]}` : id;
                        this.headings_menu.push({
                          id: finalId,
                          title: heading.textContent,
                          level: heading.tagName.toLowerCase(), // Track heading level
                          active: false, // Initially set active to false
                        });
                        heading.id = finalId;
                      });
                    },

                    checkStickyNeeded() {
                      const ul = this.$el.querySelector('ul');
                      if (ul) {
                        this.shouldBeSticky = ul.scrollHeight < window.innerHeight;
                      }
                    },

                    setActiveHeading() {
                      // disabled not working with active state on click
                      // add @scroll.window="setActiveHeading()" to the parent div

                      // const headings = document.querySelectorAll('.js-article-full-headings h2');
                      // let activeHeading = '';
                      // let closestHeadingDistance = Infinity;

                      // headings.forEach((heading) => {
                      //   const rect = heading.getBoundingClientRect();
                      //   const offset = rect.top - window.innerHeight / 2; // Consider heading in the middle of the screen as active

                      //   if (offset < 0 && Math.abs(offset) < closestHeadingDistance) {
                      //     activeHeading = heading.id;
                      //     closestHeadingDistance = Math.abs(offset);
                      //   }
                      // });

                      // // Update the active state in headings_menu
                      // if (activeHeading !== this.heading_active) {
                      //   this.headings_menu = this.headings_menu.map(item => ({
                      //     ...item,
                      //     active: item.id === activeHeading,
                      //   }));
                      //   this.heading_active = activeHeading;

                      // }
                    },

                    setActiveItem(clickedId) {
                      this.headings_menu.forEach(item => {
                        item.active = (item.id === clickedId);
                      });
                      this.heading_active = clickedId; // Optionally update the heading_active property if used
                    },
                  };
                }
               1. <a :class="{ 'border-r-[3px] border-secondary': item.active, 'text-sm': item.level === 'h3' }" :href="'#' + item.id" class="inline-block text-balance hover:underline p-0.5 pr-3">  — </a>
  



 

[Google](https://www.mergado.com/tag/google-shopping) and [Facebook](https://www.mergado.com/tag/facebook) have added new elements to their specifications in recent months without any notification. As a result, in Mergado, these elements **were not automatically hidden** in projects that had the Google or Facebook format on input. Although we’ll include adjustments to these formats in the next release, we want to let you know what to keep an eye on.

## What new elements have Google and Facebook added



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-tabulka.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-tabulka.png) 

### What effect does this have on your projects in Mergado

Many output formats (e. g. Heureka) **automatically** **hide** the given elements when converting from Mergado to export [XML](https://www.mergado.com/tag/xml-feed).

HOWEVER:

Other formats (e. g. *MallMarketplace*, *Árukereső*) cannot automatically hide these [elements](https://www.mergado.com/tag/elements) when creating XML, but allow them to be hidden manually on the *Elements* page. If the user does not hide them manually, they **are transferred to the output XML**. Facebook and Google format elements start with the so-called “G:” namespace and this fact must be **defined** in the XML header. If this is not the case, the XML will start to contain elements that the commodity **does not support** and render the format **invalid**.



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/nahled-chybove-hlasky.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/nahled-chybove-hlasky.png) 

Our modification in the release on September 2, 2020, will cause these elements to be hidden, not output, and the XML will **remain** **valid**. If you may be using these elements, be prepared to be hidden in early September 2020.

### What Mergado can convert from advanced elements

**Facebook translates new elements:**

- G:INVENTORY -&gt; storageqty (MergadoXml)
- G:GENDER -&gt; gender
- G:SIZE -&gt; size
- G:MATERIAL -&gt; material
- G:MOBILE LINK -&gt; url\_mobile
- G:COLOR -&gt; color

In Mergado, we can **upload and convert parameters** through it. And so that:



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-1.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-1.png) 

we convert to **G:ADDITIONAL\_VARIANT\_ATTRIBUTE|Style, Cool**.

**IMPORTANT**

We only convert parameters from Facebook to other formats. Conversely, we **cannot** **convert** to G: ADDITIONAL\_VARIANT\_ATTRIBUTE — Facebook does not want this element to contain the main attributes (color, material, etc.), but only additional ones.

**Google** **converts** the new G: TAX | G: RATE element to -&gt; vat. Newly also supports parameters where from:



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-2.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/nove-elementy-2.png) 

it creates **G: ATTRIBUTE\_VALUE | Product Type, Digital player**.

If the format supports these parameters, it can easily **convert** them. For Google, this works **the other way around**.



 

Did you know that Mergado helps you correctly map categories for both Google and Facebook? Find out how on our blog.

 

 

 

 

 

Do you have any questions or need help with setup? Do not hesitate to contact our [technical support](https://mailto:mergado@mergado.com).

### **Read more:**



 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/ai_boost-1.jpg)  

### What should a proper client context look like for performance specialists?

 

 ](https://www.mergado.com/blog/master-prompt-eshopy-b2c) 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/uawc_cs_en.jpg)  

### How Feed Optimization Unlocked Meta Ads Performance without Increasing Ad Spend

 

 ](https://www.mergado.com/blog/feed-optimization-for-meta-ads) 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/how_to_sell_successfully_on_idealo.jpg)  

### How to Sell Successfully on idealo

 

 ](https://www.mergado.com/blog/successful-sale-on-idealo) 

 

 

 [    ![](https://www.mergado.com/sites/default/files/perm/user-avatar/23021961102131189073595481259913287n.jpg)  ](https://www.mergado.com/blog/lukas-horak)###  [ Lukáš Horák ](https://www.mergado.com/blog/lukas-horak) 

Lukáš takes care of most of the Czech and English communication in Mergado. Through blogs, e‑mail, and social networks, he regularly supplies readers with e‑commerce news and news and tips from Mergado. In his time off, he enjoys simple things like badminton, digging the hidden gems of the 80’s, and seafood served with red wine.

 

 

 

 

 

 

 

 

 

## What you *might be interested in next*

 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/how_to_sell_successfully_on_idealo.jpg)  

### How to Sell Successfully on idealo

 

 ](https://www.mergado.com/blog/successful-sale-on-idealo) 

 [    ![novy_zakon](https://www.mergado.com/sites/default/files/perm/image/new-nahledovky_na_blog-1200_x_628_px-1_1.png)  

### More regulation in e‑commerce: what is EAA and what does it mean for your online business?

 

 ](https://www.mergado.com/blog/bfsg-european-accessibility-act) 

 [    ![smart value insertion article](https://www.mergado.com/sites/default/files/perm/image/smart_insertion_value.png)  

### Introducing smart value insertion. It will speed up the creation of bulk rules

 

 ](https://www.mergado.com/blog/smart-value-insertion) 

 

 

 

## Don’t miss *anything*

 Sign up for our newsletter 

   

       

   By logging in, you agree that we will process your data by the [terms of personal data protection](https://www.mergado.com/cookies). 

  Thank you, you have successfully joined our subscriber's list. 

 

 

 
      function ml_webform_success_5807248() {
        var r = ml_jQuery || jQuery
        r('.ml-subscribe-form-5807248 .row-success').show(), r('.ml-subscribe-form-5807248 .row-form').hide()
      }