Skip to main content
All CollectionsIntegrations
Adding Tydal's review structured data for SEO results
Adding Tydal's review structured data for SEO results

Boost SEO with Tydal's review structured data for better search visibility.

Jamie Conway avatar
Written by Jamie Conway
Updated over 4 months ago

Intro

Search engines like Google use structured data to understand the content of your page and gather information about the web and the world in general. Once you have reviews for your products, you'll want to ensure that search engines recognize those reviews. By adding Tydal's structured data for review snippets to your Shopify theme, you can enhance the visibility of your product reviews in search results.

Follow the steps below to correctly add review structured data to your theme.liquid file.

Step-by-step Guide:

  1. Access Your Theme Code

    • From your Shopify admin, go to Online Store > Themes.

    • Find the theme you want to edit and click the three dots.

    • Then click on Edit code.
      ​

  2. Locate the theme.liquid File

    In the left sidebar, scroll or search for the theme.liquid file under the Layout folder and click on it to open.
    ​

  3. Insert the Structured Data Script

    Scroll down to locate the closing </head> tag. Before this tag, copy and paste the code provided below:
    ​

     <!-- Tydal Reviews Snippets -->    
    {% if template == 'product' and product.metafields.ba_rev.review_data.stars and product.metafields.ba_rev.review_data.reviews_count %}
    <script type="application/ld+json">
    {
    "@context": "https://schema.org/",
    "@type": "Product",
    "name": "{{ product.title }}",
    "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "{{ product.metafields.ba_rev.review_data.stars }}",
    "ratingCount": "{{ product.metafields.ba_rev.review_data.reviews_count }}"
    }
    }
    </script>
    {% endif %}
    <!-- End of Tydal Reviews Snippets -->

  4. Save Your Changes

    After inserting the code, click the Save button in the top right corner to apply the changes to your theme.
    ​

πŸ“ Important Note: While we ensure best practices for structured data, Google's algorithms ultimately decide if and when to display review snippets in search results.

Validating your snippet with Google's Rich Results Test

Ensuring that your Tydal review structured data is correctly implemented is vital for optimal SEO benefits. Google's Rich Results Test Tool provides a straightforward way to validate your structured data. Here's a step-by-step guide:

  1. Access the Rich Results Test Tool:

    Begin by visiting the Rich Results Test Tool. Simply search for "Google Rich Results Test" in your browser or use this direct link: https://search.google.com/test/rich-results

  2. Input Your Product URL:

    In the provided field, enter the URL of a product where you've integrated the Tydal review structured data.

  3. Initiate the Test:

    Press the "Test URL" button. The tool will then scan your page, focusing on the structured data.

  4. Analyze the Outcome:

    Once the test concludes:

    • If correctly integrated, you'll see a green checkmark indicating that your Tydal review snippet is eligible for rich results (see screenshot above.)

    • If there's an issue with the Tydal snippet, the tool will flag it under "Errors" or "Warnings". Use this feedback to pinpoint and rectify any issues in the Tydal structured data snippet.

  5. Rectify and Recheck:

    If errors or warnings are identified, modify your structured data based on the provided feedback. After making adjustments, retest your URL to ensure all issues are addressed.


​

Did this answer your question?