How to Add Structured Data in Joomla

Stergos Zamagias
Stergos Zamagias
Published in Tutorials
Aug 16 2024
15 min read
Last updated sep 2 2024
How to Add Structured Data in Joomla

Want to make your Joomla site stand out in Google search results? Structured data is the key to improving your Joomla SEO. It helps your site claim more real estate on the search engine results page (SERP), boosting visibility and attracting more clicks. Without Joomla structured data, you're missing a crucial opportunity to outshine other websites in your niche.

Adding structured data to your Joomla site helps search engines better understand your content, improving your rankings and enabling rich snippets. These eye-catching elements—like star ratings, prices, or event dates occupy more space in search results, giving you an advantage over your competitors.

Article Schema in Google search results

Keep other websites from getting ahead - use structured data to enhance your Joomla SEO and dominate the search results page.

Let's explore a common scenario involving adding the Article Schema to your blog articles on your Joomla! site

Scenario: Your eCommerce site maintains a blog to share industry news, product tips, and customer stories. You want to implement the Article schema on these pages to enhance their visibility in search results. Article schema can help your content stand out by displaying rich snippets that include the article's headline, author, and publication date

Top 10 Benefits of Using Structured Data on Your Joomla Site

Structured data is revolutionizing the way websites communicate with search engines. If you’re running a Joomla site, leveraging structured data can significantly enhance your site’s visibility and performance.

Here are the top 10 benefits of incorporating structured data into your Joomla site:

1. Enhanced Search Engine Rankings

Structured data helps search engines better understand your site's content. This improved understanding can lead to higher rankings in search engine results pages (SERPs).

2. Rich Snippets

Using structured data, your Joomla site can achieve rich snippets, which directly display additional information like reviews, ratings, and prices in the search results. These snippets attract more attention and can increase click-through rates.

3. Voice Search Optimization

Structured data is crucial for voice search optimization. As more users turn to voice-activated devices for searching, having structured data ensures your content is easily discoverable and relevant to voice queries.

4. Local SEO Improvements

Structured data can enhance local SEO efforts for businesses with a local presence. Including information like business hours, addresses, and contact details in a structured format helps search engines display this information prominently.

5. Better Content Discoverability

Search engines use structured data to index content more effectively. This means users searching for related topics can more easily discover your articles, blogs, and other content types.

6. Improved Social Media Integration

Structured data can enhance how your content appears when shared on social media platforms. Rich data, like images and descriptions, ensure your posts are attractive and engaging on platforms like Facebook and Twitter.

7. Event Optimization

If your Joomla site hosts events, structured data can help them appear in event-specific search results. This can drive more attendees and improve the visibility of your events.

8. Product Listings and E-commerce

For e-commerce sites, structured data can highlight product information such as price, availability, and reviews. This improves search visibility and helps potential customers make informed purchasing decisions.

9. Increased Click-Through Rates (CTR)

Sites with rich snippets often see higher CTRs. Structured data makes your site stand out in SERPs, drawing more clicks from users who find the additional information helpful and relevant.

10. Future-Proofing Your Site

As search engines evolve, structured data remains critical to understanding and displaying content. By implementing structured data now, you’re ensuring your site remains relevant and optimized for future search engine updates.

Add structured data to Joomla without an extension

Adding structured data to Joomla without extensions gives you full control over your implementation. This method is perfect for those comfortable with coding and willing to maintain their schema manually. While it requires some technical know-how and ongoing attention, it offers the flexibility to customize your structured data exactly as needed.

Step 1: Generate Article Schema

To generate the Article Schema, we'll use a tool such as Google Structured Data Markup Helper. This tool provides a visual editor that helps us populate schema properties easily by selecting piece of content from our website.

We start by selecting the Article Schema and entering the URL of our website to which it will be added.

Generate Article Schema automatically

Once done, click on the Start Tagging button at the bottom.

On the next screen, you’ll see your website on the left side and data items on the right. Highlight your web page contents to assign data tags such as name, image, author, and date published. 

Once you have finished tagging and assigning data items, click the Create HTML button in the upper right-hand corner.

Populate Article Schema

On the next screen, you’ll be displayed with your structured data markup on the right side. The tool automatically produces the script as JSON-LD markup, which is what we want to use.

Get Article Schema JSON/LD code

Lastly, copy the JSON/LD code; we'll need to add it to our template in the next step.

Step 2: Add Article Schema

After we've generated the Article Schema in JSON/LD format, we must edit the index.php in your site’s template to add the Article Schema. To do so, follow the steps listed below:

  1. Go to System > Site Templates
  2. Find and edit your active template
  3. Open the index.php file
  4. Locate the <head> section

Copy and paste the following example PHP code within your template file's <head> section. This allows you to add the Article Schema in your Joomla articles.

<?php
if ($input->getCmd('option', '') === 'com_content' &&
		$input->getCmd('view', '') === 'article' &&
		$input->getCmd('id', '') == '123')
{
    ?>
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "Article",
        "headline": "Your Article Headline",
        "description": "A brief description of your article.",
        "author": {
            "@type": "Person",
            "name": "Your Name"
        },
        "datePublished": "2024-08-05"
    }
    </script>
    <?php
}
?>

This ensures the Article Schema will appear on your Joomla article with ID = 123.

Remember to include the Article Schema JSON/LD code you copied previously in the code above.

Note: You can customize the above code to automatically grab the information about the currently viewed article and populate the Article Schema using PHP code.

You can find a plethora of Google-supported schemas here and a list of all schemas and their properties here.

Step 3: Save Changes

Save all the changes you've made to your template.

That’s all! Your Joomla site will now include the Article Schema on the defined Joomla article, helping Google better understand your site’s content.

Let’s examine the pros and cons of this method below:

Pros

  • Complete control over the structured data implementation
  • No need to rely on third-party extensions
  • Can be customized for specific needs

Cons

  • Requires coding knowledge
  • It is time-consuming to implement and maintain
  • Potential for errors if not implemented correctly
  • Must keep up to date with the schema.org vocabulary

Add structured data to Joomla using Google Tag Manager

Another way of adding structured data to your Joomla! website without an extension is using Google Tag Manager. Google Tag Manager allows you to add custom codes to your Joomla! site which is exactly what we'll be doing in this tutorial.

Step 1: Generate Article Schema

In order to generate the Article Schema, we'll use a tool such as Google Structured Data Markup Helper. This tool provides a visual editor that helps us populate schema properties easily by selecting piece of content from our website.

We start by selecting the Article Schema and entering the URL of our website, where the Article Schema will be added.

Generate Article Schema automatically

Once done, click on the Start Tagging button at the bottom.

On the next screen, you’ll see your website on the left side and data items on the right. Highlight your web page contents to assign data tags such as name, image, author, and date published. 

Once you have finished tagging and assigning data items, click the Create HTML button in the upper right-hand corner.

Populate Article Schema

On the next screen, you’ll be displayed with your structured data markup on the right side. The tool automatically produces the script as JSON-LD markup, which is what we want to use.

Get Article Schema JSON/LD code

Copy the JSON/LD code; in the next steps, we'll need to add it to our Google Tag Manager tag.

Step 2: Create a Google Tag Manager account

To get started, you must first create a Google Tag Manager account, and enable Google Tag Manager on your Joomla! site.

After you've enabled Google Tag Manager on your Joomla! site, it's time to set it up to include the Article Schema on our articles.

We'll need to set up both a trigger and a tag.

What are triggers?

A trigger listens to your Joomla! site for specific events such as form submissions, button clicks, or page views. It tells the tag to fire when a specific event is detected. A trigger can execute on specific pages.

What are tags?

A tag is a snippet of code that executes actions like sending data to Google Analytics or firing custom scripts. When a trigger detects a specific event, the tag is fired to perform the defined action on your Joomla! site.

Step 3: Create a Google Tag Manager trigger

From your Google Tag Manager Workspace, click on "Triggers" from the left-hand sidebar, and click on the "New" button.

Create new trigger

A trigger specifies where the Article Schema JSON/LD code will be added to your Joomla! site. In our case, we'll embed it in a specific Joomla! article.

On the new modal, enter a title and click on the icon within the "Trigger Configuration" section.

Configure trigger

Next, select "Page View" as the trigger type. This means that it will only run when the user views a page.

Select Page View as the trigger type

We now need to specify on which page the trigger will run. As we previously mentioned, it must run only on a specific Joomla! article.

Select "Some Page Views" under "This trigger fires on." Then select "Page URL" and "equals", specifying the Article URL on your Joomla! site where the Article Schema will be added, and click "Save."

Specify Page URL for trigger

Your trigger is now created!

Trigger has been created

Step 4: Create a Google Tag Manager tag

The next step is to create the tag, including the Article Schema JSON/LD code that will be added to your Joomla! site.

From your Google Tag Manager Workspace, click on "Tags" from the left-hand sidebar and then on the "New" button.

Create new tag

Specify a name for your tag, and click on the icon under the "Tag Configuration" section.

Configure tag

On the modal that'll appear, select "Custom HTML".

Select Custom HTML to  add the Article Schema JSON/LD code

Next, add the Article Schema JSON/LD code you generated in "Step 1".

Add Article Schema JSON/LD code

Next, click the icon under the "Triggering" section.

Specify how the tag will be triggered

Select the newly created trigger.

Select previously created tag

Click on the "Save" button.

Save the tag

Step 5: Save Changes

The last step is to save your Workspace changes. To do so, click on the "Submit" button.

Submit Google Tag Manager changes

That’s all! Your Joomla site will now include the Article Schema on the specified Joomla article, helping Google better understand your site’s content.

Let’s examine the pros and cons of this method below:

Pros

  • Complete control over the structured data implementation
  • No need to rely on third-party extensions
  • Can be customized for specific needs
  • Easy implementation allows adding structured data without modifying the site's code
  • Centralized management of all tags simplifies the process of handling multiple tracking codes
  • Version control enables quick rollback of changes, reducing risk

Cons

  • Requires coding knowledge
  • It is time-consuming to implement and maintain
  • Potential for errors if not implemented correctly
  • Must keep up to date with the schema.org vocabulary
  • Performance impact may occur due to the added load from multiple tags or scripts

Add structured data to Joomla using built-in Schema

Joomla 5 introduced a basic level of structured data integration, specifically for Joomla articles. This new feature allows you to add some essential schema directly to your articles. This built-in feature provides an easy way to enhance your content's visibility in search results.

The supported schemas are Article, BlogPosting, Book, Event, Organization, Person, Recipe, and JobPosting, which are quite limited and may not suffice for eCommerce Joomla sites.

Step 1: Access Schema Tab

Open the desired article. Locate and click the "Schema" tab within the article editor.

Select Joomla 5 native Schema tab in Joomla article

Step 2: Select Schema Type

Choose the most suitable schema type from the available options (e.g., Article, BlogPosting, Product).

Select Joomla 5 Article Schema in Joomla article

Step 3: Configure Schema Properties

Fill in the required fields within the schema editor. Provide accurate and relevant information.

Customize Joomla 5 Article Schema in Joomla article

Step 4: Save Article

Click the "Save" button to apply the added structured data to your article.

Congratulations! You've successfully added structured data to your Joomla article, improving its visibility in search results.

Pros

  • Easy to use for basic schema implementation.
  • No need for additional extensions or coding for simple setups.
  • Integrates seamlessly with the Joomla articles

Cons

  • It is missing popular schema types such as Product, Local Business, Review, and more.
  • It supports a limited set of properties and is missing popular ones such as rating values, reviews, review count, etc.
  • Integrates only with Joomla Content
  • Having many Joomla articles requires you to manually edit each article to update the Article Schema with new content.
  • It depends on Joomla updates to enhance, fix, and improve the Schema properties.

Add structured data to Joomla with an extension

This method focuses on using a dedicated Joomla! extension. This approach can significantly simplify adding structured data to your Joomla website.

Google Structured Data is a powerful SEO Joomla extension that makes adding rich snippets to your website easier. By providing clear and structured information to search engines, you help search engines better understand your site’s content, which can significantly boost your search rankings and attract more organic traffic. Let's explore how to leverage GSD to optimize your Joomla site.

Step 1: Install Google Structured Data extension

To install the Google Structured Data extension, go into your Joomla site's backend > System > Install > Extensions.

From this page, click the "Install from Web" tab. Search for "Google Structured Data", and click on the "Google Structured Data" extension from the search results.

Find Google Structured Data to Install from web

Next, click on the Install green button to start installing Google Structured Data.

Install Google Structured Data using Install from web

Step 2: Create Article Schema

Go to Components > Google Structured Data > Items and click “New”.

Create new Google Structured Data item

Select "Article" as the Content Type and “Joomla Content” as the integration.

Select Article Schema and Joomla Content Integration in new Google Structured Data item

Configure your Article Schema properties. Set up as many properties as possible, which makes the Article Schema more “rich.” This gives Google more information about your page, providing a higher chance of displaying rich snippets for your product page. Remember always to provide true content.

Populate Article Schema in Google Structured Data item

Step 3: Set up Publishing Rules (Optional)

Set up Publishing Rules to make your structured data appear only on the Blog articles and not the rest. To do so, click on Publishing Rules > Category > Select “Include” and select the “Blog” category.

Set up Publishing Rules in Google Structured Data item

Save and test the generated structured data to ensure smooth generation. Click here to read more about testing your structured data. Optionally, you can re-index your pages in Google Search Console to let Google know your chances faster.

The Google Structured Data extension offers various content types to suit your site’s needs. Among the most commonly used schemas are Product, which enhances e-commerce listings; Local Business, which provides insight about your business; and Review, which includes customer feedback. While these are just a few examples, Google Structured Data supports many more content types. To explore the full range of supported schemas, click here.

Similarly to supporting various content types, Google Structured Data also supports a variety of integrations, such as VirtueMart and Hikashop, to boost your e-commerce listings with rich snippets that include ratings, prices, and reviews, and YooTheme integration to include all article details in search results. To learn more about how these integrations can benefit your Joomla site and to explore additional supported extensions, click here.

Pros

  1. It’s free to add structured data, such as the Article Schema!
  2. User-friendly interface: No need for direct code manipulation.
  3. Time-saving: Automatically generates schema markup based on your Joomla extension.
  4. Flexibility: Supports multiple schema types.
  5. Integration: Supports a plethora of integrations with 3rd-party extensions.
  6. Updates: The extension is regularly updated to support new schema types, properties, and integrations.
  7. Consistency: Ensures uniform implementation across your site.

Cons

  1. Limited customization: This may not support specific schema properties.
  2. Dependency: Reliance on the extension for ongoing schema implementation.

Conclusion

Implementing structured data on your Joomla website is crucial for improving search engine visibility and user engagement. While manual implementation and built-in features offer some benefits, the Google Structured Data extension emerges as the superior solution for Joomla users. This powerful tool simplifies adding schema markup, making it accessible to users of all skill levels. With its user-friendly interface, support for multiple schema types, and seamless integration with Joomla, the Google Structured Data extension stands out as the most efficient and effective way to enhance your site's SEO performance. By choosing this extension, you're not just adding structured data – you're investing in a comprehensive solution that will continually improve your site's search presence, increase click-through rates, and ultimately drive more valuable traffic to your Joomla website.

Joomla Schema Markup and Rich Results Extension
The simplest way to implement schema markup in Joomla
Markup your content with structured data and enhance the appearance of your Joomla site with rich results. Boost SEO in a few clicks.
5.0 rate from 293 reviews