[M2] UB Rich Snippets extension uses JSON-LD to automatically add valid structured data information (using schema.org vocabulary) such as brand, product name, the number of reviews and ratings, price, category breadcrumb, etc. onto Search Engines.
The extension entirely separates the markup data from the HTML code. So, you do not need to tweak the HTML elements directly to integrate the snippets.
The extension primarily supports the following types of rich snippets:
- Product Snippets
- Category Snippets
- Facebook OpenGraph
- Twitter card (work-in-progress)
- Sitelinks search box
I. Installation Prerequisites
UB Rich Snippets is native with Magento 2.x. Please make sure your system meets the Magento 2 System requirements: here.
II. Download Packages
The user guide below will walk you through the installation and configuration process to set up the UB Rich Snippets module. Let’s get started.
The download package is available via your profile:
- Step 1. Unzip the download package
- Step 2. Copy and paste the folder app of the package to your web root. You should see the path PATH_TO_YOUR_MAGENTO_2/app/code/Ubertheme/RichSnippet like the following screenshot:
- Step 3. Open the command window, then go to web root folder and run the following commands:
- php -f bin/magento module:enable -c Ubertheme_Base
- php -f bin/magento module:enable -c Ubertheme_RichSnippet
- php -f bin/magento setup:upgrade
- Step 4: Run the deploy command to regenerate static files:
- php -f bin/magento setup:di:compile
- Then run one of the following commands:
- If your M2 is in a production mode: php -f bin/magento setup:static-content:deploy
- If your M2 is in a developer mode: php -f bin/magento setup:static-content:deploy -f
Now the UB Rich Snippets extension has been installed on your Magento 2 instance.
IV. UB Rich Snippets Configuration
In your Magento backend, go to Ubertheme’s Extensions | (UB Rich Snippets) Settings, you can see the General settings of UB Rich Snippets:
- Product Rich Snippets
- Category Rich Snippets
- Facebook Open Graph
1. Product Rich Snippets Settings
If enabled, UB Rich Snippets helps search engines return detailed information about your products with JSON-LD format (recommended by Google here) such as brand, product name, product prices, stock availability, product reviews and ratings, etc.
- Enable : If set to Yes, product snippets is enabled.
- Descriptions: Select the source of product’s description (Product Short Description/ Product Long Description/ Product Meta Description/ None). Select ‘None’ to disable.
- Show Availability: Select the type of product’s stock status ( In/Out of Stock /None). Select ‘None’ to disable.
- Show Rating: Show/Hide the product ratings and reviews in Rich Snippets.
- Show Condition: Select the item’s condition according to schema.org. Select ‘None’ to disable.
- Show SKU: Show/Hide the product SKU in Rich Snippets.
- Brand: Select the attribute of the Brand. Select ‘None’ to disable.
- Manufacturer: Select the attribute of the Manufacturer. Select ‘None’ to disable.
A preview of a product page on UB Rich Snippets demo:
2. Category Rich Snippets Settings
Google applied new changes to the Category Rich Snippets, you can learn more about it here.
- Enable: If set to Yes, category snippets is enabled.
- List all products: Show/Hide the Rich Snippets of all related products.
4. Organization Settings
This feature is handy when you want to provide the search engine with better structured information about your business (merchant) such as your store name & description, location, opening hours, links to social pages, phones, etc. if they are any available.
- Organization Name: Enter your organization name.
- Logo Image Url: Enter the URL of your logo image.
- Description: Enter the description your organization.
- Description Max Length: Determine the maximum characters in length displayed in the description.
- Country: Enter your country organization.
- Region/ State: Enter ZIP/postal code where the organization address is located.
- City: Select your city organization.
- Postal Code: Enter your postal code organization.
- Phone Number: Enter an internationally-recognized standard phone number. Example: +1 425 5552671.
- Fax: Enter your fax organization.
- Email: Enter your email organization.
- Social Profiles: Enter your Profile URL. UB Rich Snippet extension enables you to display common social channels like Facebook, Twitter, Instagram, YouTube, LinkedIn, Myspace, Pinterest, SoundCloud, Tumblr.
5. Website Settings
The extension enables to include your Website information (name and description) into search engine rich snippets & social media shares.
- Enable: If set to Yes, website snippets is enabled.
- Website Name: Enter your website name.
- Website Intro: Enter your website intro.
- Intro Max Length: Determine the maximum characters in length displayed in the Website Introduction.
- Enable Sitelinks Search Box: Display a Search Box scoped to your site right in Google search result page. Set “No” to disable.
If enabled, Google determines if your site gets a Sitelinks Searchbox though.
This search box appears under the main URL for your brand in the search results. It lets your customers look for desired products right from Google’s results page.
A preview of Sitelinks Search Box:
6. Facebook Open Graph Settings
If enabled, with the help of Open Graph tags, this feature helps the Facebook Crawler pick up the right title, description, and the most suitable preview image that gets pulled into Facebook when a URL from your site is shared.
- Enable: If set to Yes, Facebook Open Graph snippets is enabled.
- Description: Select the source of product’s description (None/ Product Short Description/ Product Long Description/ Product Meta Description). Select ‘None’ to disable..
- Price Type: Select the type of price (Including Tax/ Excluding Tax). Default is Including Tax.
- Website Name: Enter your website name.
- App ID: Enter your App ID.
- Retailer’s ID for the product item: Select the retailer’s ID of the product item (Product’s ID/ Product’s SKU). Default is Product’s ID.
A preview of Facebook Open Graph:
7. Manual Uninstallation
If you want to have UB Rich Snippets extension uninstalled, please follow steps below:
- Step 1: Disable UB Rich Snippets module and clean associated database tables
-- Open your terminal, go to your Magento2 folder <your magento installation path> and run the following CLI commands:
php -f bin/magento maintenance:enable
php -f bin/magento module:disable -c Ubertheme_RichSnippet
rm -rf /app/code/Ubertheme/RichSnippet
-- Open your Mysql cpanel (eg. PHPMyAdmin), and run the following SQL syntax:
NOTE: Make sure you replace with your own <table_prefix>:
DELETE FROM `<table_prefix>setup_module` WHERE `module` = 'Ubertheme_RichSnippet';
- Step 2: Once done, run the following commands:
NOTE: You can still keep the developer mode if you continue development process. Otherwise, run the following commands to switch to production mode:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento maintenance:disable