Note: Display 3 documentation is provided as a courtesy for clients on this legacy version of PowerReviews. It is no longer supported. We recommend contacting your Account Manager to discuss upgrading to our newer Display 4.1 version as soon as possible.
Content that is displayed via JavaScript is not visible to some search engines. By using In-Line SEO (ILSEO), you can overcome this limitation, allowing you to do the following:
- Make review and/or Q&A content on product pages visible and indexable to search engines.
- Consolidate SEO impact by allowing search engines to deep link directly into your product pages.
- Help drive organic traffic to your product pages.
The following sections will go in-depth about how to integrate ILSEO into your reviews enabled eCommerce website. Requirements and Assumptions will be outlined, as well as some general but necessary technical details, which include a high level explanation of the ILSEO process and the specific steps required to implement ILSEO.
Requirements and Assumptions
Note the following system requirements and assumptions necessary to integrate ILSEO:
- Understanding of Server Side Includes (SSI), preferably at the application server layer
- Experience with database-backed Web applications
- Your platform's webserver is SSI enabled
- You must enable the standard platform JavaScript engine call and full.js on the Product Display Page
Procedure
The following procedure outlines in general the steps required to access and use the inline content. Your system’s details determine exactly how you need to perform particular steps, such as parsing XML files and coding the server side include process.
1. Download the review_data_summary.xml file from the Content Bundle. In order for the review_data_summary.xml file to contain any data there must be review content generated for the account.
2. Parse the review_data_summary.xml file for the location of the in-line review content and store those locations in a web accessible database.
3. Create a server side include to render the review or Q&A content on your Product Display Page.
XML Data
The XML data contains the locations of static HTML files that are used for ILSEO. These locations are identified by <inlinefile> element
<product locale="en_US">
<pageid>abc</pageid>
<inlinefiles>
<inlinefile reviewpage="1">pwr/xxxxxx/inline/12/34/abc-en_US-1-reviews.html</inlinefile>
</inlinefiles>
<inlinequestionfiles>
<inlinefile questionpage="1">pwr/xxxxxx/inline/12/34/abc-en_US-1-questions.html</inlinefile>
</inlinequestionfiles>
</product>
You should process the XML file daily to ensure you have the most up to date content. Keep the following points in mind
Individual HTML files are provided for each unique page_id and locale pair.
It is possible for an <inlinefile> element of a previously approved and deployed review to disappear from the XML. This occurs if an approved review is later rejected and removed from the site. In this case, the entire html fragment file where the review originally appeared will be removed. Your code which parses the XML should be able to handle this case, removing any reference to the previous value of the inlinefile element from your database.
Example In-Line Review Location Data Database Table
PID | Locale | Location |
abc | en_US | /pwr/xxxxxx/inline/12/34/abc-en_US-1-reviews.html |
def | en_US | /pwr/xxxxxx/inline/56/78/def-en_US-1-reviews.html |
Server Side Include
Create a server side include process to render the in-line review or Q&A content which is in the form of static HTML files included in your Daily Content Bundle.
Your Server Side Include will need to gracefully handle any errors encountered to ensure that no errors are returned to the product page. In the event of an error, return “nothing” to the page and the platform JavaScript will render the Review Display client side.
Placement of Server Side Include and JavaScript Calls
It is very important to place the server side include immediately before the platform JavaScript engine call. If you separate these elements or reverse their order, the reviews display is likely to malfunction.
Where <server side include> and <yoursite> are your site’s values, the calls on your product page will look like this (after you complete the JavaScript Implementation on your PDP):
Server Side Include Placement
<server side include>
<script type="text/javascript">POWERREVIEWS.display.engine(document,{
pr_page_id : '1234',
pr_write_review : 'http://www.<yoursite>.com/review.jsp?pageId-1234'
});
</script>
The example above is for reviews. The Social Answers call to display Q&A uses the productAnswers() function and Social Answers parameters.
Troubleshooting
User interactions with the review display do not work.
Omitting a call to the full.js engine() function. If reviews display correctly for products with just a single page of reviews but pagination or other user interactions such as changing the sort order do not work, the likely problem is a failure to include a call to engine(). The engine() call is required to support pages with user interactions or no reviews.
There are duplicate reviews on a page.
Placing the engine() call before the server side include. If there are duplicate reviews on a page, the likely problem is putting the function calls in the wrong order. With the engine() call first, it renders the reviews on the page, and then the server side include also renders reviews on the page. When you properly place the server side include before the engine() call, the engine() call detects that the review has already been displayed and does not display it again.
Reviews are displayed in unexpected locations.
Separating the server side include and the engine() call. If reviews are displayed in unexpected locations, the likely problem is intervening code between the server side include and engine() call. Be sure that you place the server side include immediately before the engine() call.