microdata tags

#433088
  • Resolved Trendy Meubels
    Rank Math free

    Hi!

    I’m trying to set up my facebook catalogue with products from my webshop. If I want to add items to the catalogue automatically using the installed pixel, I’m getting the message:

    This pixel’s microdata is incomplete or incorrectly formatted
    To use this pixel to add or update items in your catalogue, you need to install the required microdata tags on your website. Learn more

    I’ve asked Elementor, the theme I’m using, how to do that, and they said that I can do that with your plugin. I’ve installed the RankMath plugin and connected it, but I’m still getting the same message on Facebook.

    Can you help me with this?
    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting the support and we regret the inconvenience caused.

    By default, we do not add the meta tags for Facebook Pixel as we’re primarily focused on SEO for search engines.

    However, you can modify the use below filter to add all the required meta tags. Please add the below filter to the website and see if that helps:

    add_action( 'rank_math/head', function() {
      if ( ! is_product() ) {
          return;
      }
    
      global $product;
      echo '<meta property="product:price:amount" content="'.wc_get_price_including_tax( $product ).'" />';
      echo '<meta property="product:price:currency" content="GBP" />';
      echo '<meta property="product:retailer_item_id" content="'. $product->get_id() .'" />';
    }, 99 );

    Here’s how you can add the filter: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘microdata tags’ is closed to new replies.