3rd-party Aggregate Rating Integration

#388836
  • Resolved Peter Fritz
    Rank Math free

    Hi Team RankMath,

    We are trying to integrate the review information from our 3rd-party review platform provider (productreview.com.au) with our schema information on https://www.vbreathe.com/product/vbreathe-tasman/ via RankMath, but have been unable to achieve the desired result.

    We’ve been advised by our our 3rd-party review platform provider that the most appropriate solution would be to directly call their SEO Rich Snippet endpoint server side, extract the data and use it in your current schema. The endpoint is as per details shared in the ‘Sensitive Data’ section.

    Please provide assistance/direction how we can link the endpoint to RankMath to populate the relevant schema section (ie. aggregateRating and potentially individual reviews)

    Thanks,
    Peter

Viewing 1 replies (of 1 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with customizing your product schema.

    The amount of customization involved to integrate the external API with your schema rating is beyond the scope of our support. However, here are some pointers.

    You can use the wp_remote_get() function to pull the schema rating value from the API as described in the following article: https://pippinsplugins.com/using-wp_remote_get-to-parse-json-from-remote-apis/. You can then add a filter to display the new rating in your product schema. You’ll need to customize the following filter for this:

    
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['aggregateRating']['@type'] = 'aggregateRating';    
        $entity['aggregateRating']['ratingValue'] = $ratingValue; //ratingValue from API
        $entity['aggregateRating']['reviewCount'] = $reviewCount; //ratingValue from API
        return $entity;
    });
    

    Hope that helps. Please let us know if you have questions.

    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 ‘3rd-party Aggregate Rating Integration’ is closed to new replies.