Product Id missing when using Facebook Pixel

#100855
  • Resolved keiraev
    Rank Math free

    Essentially the title. I’ve uninstalled, reconnected both plugins. (Facebook for Woocommerce and RankMath) Made sure that all my products have SKUs, I’m not sure if that’s relevant.

    A required field is missing: id
    Products without "id" information can't be uploaded. Please check that this field is included for each product in a separate, labeled column.

    This in fact the same issue as this ticket, but it had no step by step solution. If someonw could explain further how to extend the the JSON-LD data

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math.

    Here is a code to give you you direction on how to apply this:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['Product'] ) ) {
            $data['product']['additionalProperty'] = ['@type' => 'PropertyValue', 
    		'propertyID'=> 'item_group_id', 
    		'value'=> 'fb_tshirts'];
        }
        return $data;
    }, 99, 2 );
    

    You only need to follow the markup guideline here: https://developers.facebook.com/docs/marketing-api/catalog/guides/microdata-tags#json-ld

    Looking forward to helping you. 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 ‘Product Id missing when using Facebook Pixel’ is closed to new replies.