Shopper Ratings - Installing Shopper Ratings

Staffing Requirements

  • Project Manager
  • Server Side Developer
  • Front-End Developer

Overview

Installing Shopper Ratings requires in-depth coordination in between the Customers and Webcollage Tech Teams. Each installation requires up to two code deployments. During each deployment, the Webcollage Tech Team stands by to ensure all code is working correctly and without conflicts.

The first code push requires placing the Webcollage Script to an Webcollage Accessible location. Once this URL has been tested, styled and coded, it is recommended to deploy Shopper Ratings to the rest of the client’s web site. This process generally takes two or three weeks.

shopperRatings12

Product Detail Page Installation

Step 1. Setting up a Product Catalog

In order for Answers to place reviews on your product page, we need to know about the products you sell. This is done by sharing a copy of your product catalog with us so that we can match the product content to the product detail pages on your site.

To share your product catalog, you will need to create a data feed (or report) containing information about the products you sell. The data required for the feed is already in your possession. If you decide not to employ the Shopper Ratings Category Rank Feature, this step is not required.

Sharing your product catalog follows these steps.

  1. Create a comma-separated values file (CSV) containing details about the products in your product catalog. Information about the fields that must be included in the file are in the table below. The file name must be “catalog.csv”
  2. When the catalog.csv file is ready, you will upload it to the root folder on the Webcollage FTP server.
  3. When the file is ready, your next step is to schedule delivery of the file to the Webcollage FTP server. To schedule delivery, create a batch script that generates the file daily (or more frequently if needed) and then uploads the file to the Webcollage FTP server. We recommend scheduling the procedure before 5:00 a.m. Eastern Standard Time, which is when we pick the file up.

Creating the CSV File

These are the fields that must be included in the CSV file, and the order in which they must appear. The file must include a header row with a column for each field shown below.

Element Name Status Description
Product-id = (required) The unique retailer product ID. This is the ID used to display a product page and/or add the product to the cart.
brand = (required) The name of the brand (e.g., Samsung, Oral-B).
mpn = (required) The manufacturer part number. (You must provide either an MPN or GTIN, or both.)
gtin = [numeric] (required) UPC, EAN, or GTIN. (You must provide either an MPN or GTIN, or both.)
name = (required) The name of the product on your web site.
product-page-url = (required) The URL of your product detail page.
sku = [alphanumeric] (required) A site-specific SKU, when applicable. In some cases, multiple products have the same product ID, and are identified by retailer SKU.
category = (required) The category for the product hierarchy, use the | separator (For example: Electronics|TV|LCD).
product-image-url = (required) The URL of your product image.
price = [numeric] (optional) Product price in native currency.
product-family = (optional) List name of product family. Products can be will share associated reviews from one product to another.

Although some fields may be left empty, the column must be included in the file. You are strongly encouraged to provide as much information as possible to help the Webcollage system properly match content to your products.

The following is an example of how a line of data is represented in the file. Note that both mandatory and optional fields are included, even if data is not provided.

0347770,Acer,LX.R4P02.020,884483502622,"Aspire AS5742Z-4685 Laptop Computer - Black",http://www.mysite.com/p/0347770,,Home|Computers|Laptops,http://www.mysite.com/p/0347770.jpg,469.99

Keep your catalog up-to-date so that any change in your product inventory and prices are reflected as soon as possible. Once your product feed is complete, send the URL to the Project Manager.

CSV Best Practices

  • CSV file format is a comma-separated list of values. Fields that may contain embedded commas or double-quote characters (as is often the case with product names) must be surrounded with double quote characters. In addition, any embedded double-quote characters must be represented by consecutive double-quotes. For example, VIZIO – M- Series – 32″ Class – LED – HDTV would be represented as “VIZIO -M-Series – 32”” Class – LED – HDTV”
  • Use UTF8 to encode the file to support characters that are not ASCII (e.g., ©).
  • Use dot notation (rather than commas) for prices. For example: 1373.83
  • Make sure the catalog feed includes all of your products. Products in your catalog but not included in your feed will not receive any content.

FAQ’s

Q: What if I am missing details for mandatory fields?

Webcollage uses these details for matching reviews to the appropriate product detail pages on your site. If mandatory details are missing, content cannot be correctly matched and will therefore not display.

Q: Why does Webcollage need my pricing information?

Webcollage uses your pricing information for reporting purposes in addition to the ranking algorithm used in Category Rank. If you do not provide pricing, Webcollage cannot calculate data showing sales figures and the impact of the content on sales.

Q: What happens if product details are entered incorrectly or the format is incorrect?

Webcollage uses the details in the file for matching content to the product detail pages on your site. If the file cannot be accurately read, content cannot be matched correctly, and will therefore not be displayed. In this case, please revise the file and replace the incorrect file on the FTP server.

Q: Can Webcollage pull the data from my FTP site?

In some cases this can be arranged. Contact Webcollage for help setting this up.

Q: Can I reuse feeds that I give to other companies?

You may be able to reuse a file. However, some adjustments may be required. Contact Webcollage for help setting this up.

Q: If I have a site that displays in multiple languages, do I need a separate CSV file for each language?

Yes.

Q: Can I use a format other than CSV?

You may be able to use another format if you already share your product catalog with a third party – a comparison shopping engine such as Shopping.com, Google Product Search) or a data aggregation company (such as Channel Intelligence). Contact Webcollage support to find out if you can leverage the same data.

Step 2: Place JS and Divs on Product Detail Page

As detailed in the previous screenshot, Shopper Ratings requires the following div’s and JavaScript to be placed in the appropriate places in order to function correctly. This script is best used for retailers who leverage features such as “Category Rank.” This feed will allow us to determine which products to show/hide in this module.

Shopper Ratings Divs

/*Place next to price*/
<div id="answ_reviews_widget"></div>
/*Place in tab or underneath description*/
<div id="answ_reviews_review"></div>
/*Place under related products (if applicable)*/
<div class="acs_cat_rating" data-acs-product-id="YOUR PRODUCT ID"></div>

Shopper Ratings Script

This script needs to be placed at the bottom of the page.

/** Beginning of Webcollage Script - Place before </body> tag **/
<script>
   (function(w) {
      var acs = w._answ_cloudservices = w._answ_cloudservices || {};
         acs.site_code = "YOUR SITE CODE";
         acs.product_id = "YOUR PRODUCT ID";
         /** Start of optional fields - inline js **/
         acs.limit = LIMIT;
         acs.mpn = "MPN" || null;
         acs.sku = "SKU";
         acs.category_product_ids = TRUE;
         acs.answ_category = "YOUR > BREADCRUMB > NAV";
         acs.brand = "Brand";
         acs.product_name = "Your Product Name";
         acs.image_link = "//yourdomain.com/image.png";
         acs.url = "//yourdomain.com/detail_page.aspx?id=something";
         /** End of optional fields **/
   })(window);
</script>

<script type='text/javascript'>
// Answers Cloud Services Embed Script v1.02
// DO NOT MODIFY BETWEEN THESE LINES 
*****************************************
;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.mi
n.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {var
aT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, functi
on(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window);
// DO NOT MODIFY BETWEEN THESE LINES 
*****************************************
</script>

/** End of Webcollage Script **/

Activation JS API Call (If applicable)

If your site renders our ratings module behind tabs, please add the following code to activate a selected tab when the user clicks “Read [N] Reviews” on the reviews widget.

window._answ_cloudservices.onload = function (api) {
   api.addEventListener(api.eventNames.READ_REVIEWS_CLICK, function (e) {
      $("#tab-name-here").trigger("click");
   });
};

Step 3: Create a Standalone Submission Page

  1. Create a blank page on site.com (e.g., http://www.site.com/write-review)
  2. Add the following code to the (blank) Write a Review page:
    <div id="answ_reviews_submit"></div>
    <script type='text/javascript'>// Answers Cloud Services Embed Script v1.02// DO NOT MODIFY BETWEEN THESE LINES *****************************************;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.min.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {varaT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, function(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window);// DO NOT MODIFY BETWEEN THESE LINES *****************************************</script>
  3. Update URL to your new Write a Review page in the Settings > Site Info

shopperRatings17

Step 4: Place JS/Divs on Category/Search Page

Shopper Ratings has a truncated script which allows our clients to render the overall rating under the thumbnails of products on search and category detail pages. Shopper Ratings follows the best practices by only rendering star ratings for products that have reviews. These ratings can be rendered as stars, bars or any other custom shape. In the example below, the “bar” implementation is rendered.

shopperRatings03

Place Script on bottom of your Search and Category Pages

Place script before the </body> tag.

<script language="javascript" type="text/javascript">
   (function (w) {
      w.define = undefined;
      var acs = w._answ_cloudservices = w._answ_cloudservices || {};
      acs.site_code = "YOUR SITE CODE";
      acs.product_id = "YOUR PRODUCT ID";
      acs.category_product_ids = true;
   })(window);
</script>

<script type='text/javascript'>
// Answers Cloud Services Embed Script v1.02
// DO NOT MODIFY BETWEEN THESE LINES *****************************************
;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.mi
n.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {var
aT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, functi
on(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window);
// DO NOT MODIFY BETWEEN THESE LINES *****************************************
</script>

Insert proper DIV tags under each respective product

Insert an empty div underneath the product:

<div class="acs_cat_rating" data-acs-product-id="PRODUCT ID"></div>

NOTE: Please make sure you’re passing the same product ID you using on the product detail page.

Example below:

Product 1
Price: $9.99
Product 2
Price: $14.99
Product 3
Price: $19.99
<empty div code here> <empty div code here> <empty div code here>

Test the script against products that have reviews

If your current implementation is still in staging, please append this variable to the url:&acs-ratings=true

Step 5: Deploy to a Production URL

To ensure quick styling of Shopper Ratings, deploy the above div’s and JavaScript (Shopper Ratings Script) to a single page that this accessible to the Webcollage Tech Manager.

Once deployed, Shopper Ratings is not visible to end users since the script is turned off by default. You can test your installation by using the following parameter:

http://site.com/product-page.htm?acs-ratings=true

This script activates Shopper Webcollage for a single page load. Once the parameter is removed, the script deactivates.

Step 6: Send URL to Webcollage Tech Manager

Once the scripts have been successfully added to the product detail and category/search pages, Webcollage will assign a designer to style the look and feel of your Shopper Ratings implementation to match the look and feel for your web site. This process generally takes one week. Our designer will create an initial design and send links to your team for final approval.

Step 7: Deploy to Production (sitewide)

The Project Manager will then send you a final URL for approval to test the implementation. The progress of the styling can be found at the following URL:

http://site.com/product-page.htm?acs-ratings=true

Deployment:

Once approved, the Project Manager will turn on your script for your Server-Side Tech to deploy sitewide.

Definitions:

acs.site_code = String (required) This is an ID given to you by Webcollage. This is the same on all pages.
acs.product_id = String (required) This is an ID unique to your product. (This matches your Webcollage product code, if applicable.)
acs.mpn = Integer (optional) An optional MPN field.
acs.sku = String (optional) An optional SKU field.
acs.answ_category = String (required) Your category breadcrumb that has been ingested by the Webcollage team, e.g., Automobiles > Trucks > Full Cab.
acs.image_link = Integer (required) A link to an image of the product.
acs.url = String (required) A URL to the product description page.
acs.brand = String (required) The brand of the product.
acs.product_name = String (required) The name of the product. This shows on each product detail reviews page.
acs.limit = Integer (optional, default: 5) The number of reviews to show on each page.
acs.description= String (optional) Product description.
acs.length= String (optional) Length of the product.
acs.width= String (optional) Width of the product.
acsb.height= String (optional) Height of the product.

Action Items

  • Sign off of the final design.
  • Ensure you can draw variables in an array on the “Product Detail” Page.
  • Ensure the “product_ID” from the product detail page script matches the “product_ID” in the post-checkout script.
  • Place script on a single page and deploy into production. The review system is not available to the general public and can only be seen using a series of special parameters. Using these parameters, the Shopper Ratings Implementation Team will style it completely.
  • If your reviews will be rendered behind a tab, please use our Tab Activation JS API call to auto-select that tab.
  • Coordinate with the Project Managers on the time and day you want to deploy Shopper Ratings. We’ll turn your review system “active” site wide.

Setting Up Ratings Accelerator

Staffing Requirements

  • Project Owner
  • Project Manager
  • Server Side Developer
  • Web Designer

Ratings Accelerator

Ratings Accelerator is a fully managed service that sends emails to customers after they have checked out. Shopper Ratings customers should approximate that 80% of their reviews will come directly from Ratings Accelerator with up to a 5% email-to-review conversion ratio.
To minimize any potential inconvenience the customer may have with receiving unsolicited emails, Webcollage only sends this email to the customer once per order.
Not only will Ratings Accelerator increase the number of reviews for your products, this service will drive customers back to your web site which leads to higher product purchase conversions and reviews.

Where do I install Ratings Accelerator?
Ratings Accelerator must be installed on the “Thank You” page. This is usually the page most customers encounter after they have completed their order.

Ratings Accelerator allows shoppers to click on a link in the email to submit a review, which will be tagged as “Verified”. The Ratings Accelerator script activates on page load and passes custom parameters such as customer firstname, customer email address, products ordered, and invoice number.

NOTE: If your organization has physical store locations where email addresses are collected, it is recommended that you use our post-checkout feed method instead (Option 2).

Option 1: Simple Thank You Page Script Installation

Please use the the following script:

<script type="text/javascript">
   (function(w) {
      var acs = w._answ_cloudservices = w._answ_cloudservices || {};
         /** required values **/
         acs.site_code = "YOUR SITE CODE";
         acs.auto_enroll = true;
         acs.product_id = ["ID1", "ID2"];
         acs.qty = ["N", "N2"];
         acs.price = ["$N", "$N2"];
         acs.invoice = "12345";

         /** required if sending post-checkout emails**/
         acs.email_send_days = 21;
         acs.email_frequency = "onceperproduct";
         /**Value must be quoted, pass customer's email address**/
         acs.email_pass = "CUSTOMER@DOMAIN.COM";

         /*Optional custom values, maximum of 10 allowed*/
         acs.custom_order0 = "VALUE0";
         acs.custom_order1 = "VALUE1";
         acs.custom_order2 = "VALUE2";
         acs.custom_order3 = "VALUE3";
         acs.custom_order4 = "VALUE4";
         acs.custom_order5 = "VALUE5";
         acs.custom_order6 = "VALUE6";
         acs.custom_order7 = "VALUE7";
         acs.custom_order8 = "VALUE8";
         acs.custom_order9 = "VALUE9";

         /** optional **/
         acs.customer_name = "Mike";
   })(window);
</script>

<script type='text/javascript'>
// Answers Cloud Services Embed Script v1.02
// DO NOT MODIFY BELOW THIS LINE 
*****************************************
;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.mi
n.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {var
aT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, functi
on(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window);
// DO NOT MODIFY ABOVE THIS LINE 
*****************************************
</script>

Testing Ratings Accelerator:

If you would like to test the script, please place script on a blank page HTML with your own email address and set the variable “reviews.email_send_days = 0.” Open this HTML page in a web browser (on a web server) and you then receive an instant notification as if you are the customer.

NOTE: A database record of a product has to exist prior to deployment of the Ratings Accelerator Script. Your web site must be crawled/uploaded with the product detail script prior to installing the previous JavaScript.

What if I’m sending emails from my own email service provider?

If you’re sending your own post-check emails but would also like to take advantage of the Shopper Ratings “Verified Purchaser” badges and rich Email Alerts system, you will need to make a few adjustments.

  1. Remove the variables “acs.email_send_days” and “acs.email_frequency” from the script.
  2. Go in the admin panel (Site Setup > Post-Checkout Script) and change the Post-Checkout Email Status to “Do not send Post-Checkout emails
  3. Hit Save.

shopperRatings11

Definitions:

acs.site_code = Integer (required) This value represents your customer ID. This is a value that is unique to every Shopper Ratings Customer. Please consult with your Project Managers to obtain this.
acs.auto_enroll = true/false (required) (required) This value has the ability to turn the script on/off while staying on the page. This allows retailers/brands to perform A/B testing by swapping the “true” or “false” value.
acs.product_id = [“ID1”, “ID2”] (required) Value that represents an array passed to Webcollage so we know which products the customer has purchased.
acs.email_send_days = Integer (required) Value that represents how many days should pass before an email is sent to the customer.
We’ve built our framework to allow you to specify on a per-order basis, when to kick the email off. For example, if a customer purchased a microwave that takes five days for delivery and a made-to-order laptop that takes 20 days, it is recommended to set this value 23 days.
NOTE: During testing, please have this number set to zero (0) to have the email kick-off immediately. Remember to change this number back to the proper value prior to deploying your code.
acs.email_pass = “customer@email.com” (required) This value represents the email address of the customer.
acs.invoice = “12345” (required) This value represents the invoice number. This number is useful if you would like to contact the customer during the 72 hour moderation window before the review is published.
acs.customer_name (optional) This value represents the customer’s first name. If available, this value is used in a pre-populated review form.
acs.price (optional) This value represents the price.
acs.qty (optional) This value represents the the quantity.
acs.custom_order0-10 (optional) This values represents custom values that will be passed to email alerts. If you like to pass the name of the customer service representative that placed a customers order, please pass the persons name (e.g. John Smith). The heading of “Sales Rep” can be added inside the admin area user “Site Setup > Post-Checkout Script.”

Action Items

  • Ensure you can draw variables in an array on the “Thank You” page.
  • Ensure the “product_ID” from the product detail page script matches the “product_ID” in the post-checkout script.
  • Submit several test orders to ensure you are passing us the complete order.
  • Prior to final deployment set the number of days to the correct amount.
    • Best Results: Using logic to determine exactly when a product will be delivered + 2-3 days for the post-checkout review.
  • Send Project Managers your final color scheme for email notifications + logo.

Option 2: Ratings Accelerator Post-Checkout Feed

Ratings Accelerator Feeds are the preferred method of sending post-checkout emails. Each order that is obtained in the daily feed will be send immediately after processing.

Post-checkout feeds can provide ample time for cancelled products/orders to be removed from the email queue.

Example Scenario:

shopperRatings22

The CSV will include one line per item purchased. For example, if a shopper purchases two items, that shopper will have two entries in this feed for that day. To keep file size minimal, each file will only posses orders that need to be sent out for that day.

If the user unsubscribed or if their domain is blacklisted (on clients behalf) from post-checkout emails, the customer will not receive an email.

Please send the following information to your Project Manager for setup:

  • FTP Address
  • Username
  • Password

You must include the following fields, in the following order:

send_date (required) This value reconfirms the date to send the post-checkout email to a user.
invoice (required) This is value represents the invoice number.
product_id (required) This is value represents your product code, part number, etc.
email_address (required) This value represents the customer’s email address.
user_name (optional) This value represents the customer’s first name.
price (optional) This value represents the price.
qty (optional) This value represents the the quantity.

Shopper Ratings SEO

Overview

Search Engine Optimization (SEO) benefits your website’s ability to rank for competitive keywords in major search engines such as Google, Yahoo and Bing. Rendering review and Q&A content natively on your web site allows search engines to accurately rank your product detail pages. The Shopper Ratings SEO implementation safely delivers content by leveraging an API to call and return your content before the page is rendered.

Review content is delivered via the Answers CDN to ensure fast response times. In the event of availability issues, the “timeout” feature allows your page to completely render if the “timeout” time exceeds your requirements.

Prerequisites

  1. You must have server-side access to your web site.
  2. You must have the Webcollage javascript on your product detail page.
  3. You must be able to pass the following variables in your API call:
    1. Merchant ID (assigned to you by Webcollage)
    2. Product ID
    3. Product Category
    4. API Key (assigned to you by Webcollage)

Implementation

  1. Open the ACSSeo.Zip file given to you by the Project Manager.
  2. Copy the files of the ACSSeo.zip into your web server directory.
  3. Reference the implementation examples (see below) to determine which code package to install.
  4. Adjust variables to (site_code, product_ID, etc.) to meet your installation requirements.

SEO Implementation Testing/Verification

Once you have successfully installed the ACS SEO Service on your server, verify the installation:

  1. Go to a product detail page with ratings and view the source code. Do a search of the source code for the following code snippet:
    1. “reviewers would recommend this product to a friend”
    2. If the above snippet renders in your source code, the content is now being rendered natively on your page.
  2. Use Google’s Rich Snippet Testing Tool to verify the content can be read by Google.
    1. Copy/Paste the a product detail page with reviews into this tool.
    2. If the ACS SEO Service was installed correctly, you should be able to see star rating using this tool.

PHP Installation

<?php include("/path/to/ShopperRatingsApi.php"); $api = new ShopperRatingsApi(new ShopperRatingsRequestParameters(array( "site_code" => "YOUR_SITE_CODE", "product_id" => "PRODUCT_ID", "category" => "PRODUCT_CATEGORY", "api_version" => "1", "api_key" => "TEST_API_KEY", "check_for_search_engine_bots" => true, "max_reviews" => 50, "endpoint_url" => "http://cloudservices.answers.com/solo/product/reviews?", "request_timeout" => 1000 ))); ?> <!DOCTYPE html> <html> <head></head> <body> <!-- Start Shopper Ratings Include --> <? echo $api->get_widget_markup(); ?> <? echo $api->get_ratings_markup(); ?> <!-- End Shopper Ratings Include --> <!-- Start Shopper Ratings Product Detail Page Script --> <script type="text/javascript"> (function (w) { var acs = w._answ_cloudservices = w._answ_cloudservices || {}; acs.site_code = YOUR_SITE_CODE; acs.product_id = YOUR_PRODUCT_ID; //saves a rendering call for the end-user acs.seoApi = false; })(window); </script>
<script type='text/javascript'> // Answers Cloud Services Embed Script v1.02 // DO NOT MODIFY BELOW THIS LINE ***************************************** ;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.mi n.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {var aT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, functi on(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window); // DO NOT MODIFY ABOVE THIS LINE ***************************************** </script>
<!-- End Shopper Ratings Product Detail Page Script --> </body> </html>

.Net Controller Example

public ActionResult Index() { IShopperRatingsApi api = new ShopperRatingsApi(); ShopperRatingsRequestParameters ratingsParams = new ShopperRatingsRequestParameters { MerchantId = YOUR_MERCHANT_ID, ProductId = "YOUR_PRODUCT_ID", Category = "YOUR_PRODUCT_CATEGORY", ApiVersion = 1, ApiKey = "TEST_API_KEY", CheckForSearchEngineBots = true, MaxReviews = 50, EndpointUrl = "http://cloudservices.answers.com/ratings/ui/main.json?", RequestTimeout = 1000 }; api.Initialize(ratingsParams); ViewBag.RatingsHtml = api.GetRatingsMarkup(); ViewBag.WidgetHtml = api.GetWidgetMarkup(); return View(); }

.Net View Example

@{ ViewBag.Title = "Api Test"; } <h2>Index</h2> <!-- Start Shopper Ratings Include --> @Html.Raw(ViewBag.WidgetHtml) @Html.Raw(ViewBag.RatingsHtml) <!-- End Shopper Ratings Include --> <!-- Start Shopper Ratings Product Detail Page Script --> <script type="text/javascript"> (function (w) { var acs = w._answ_cloudservices = w._answ_cloudservices || {}; acs.site_code = SITE_CODE; acs.product_id = YOUR_PRODUCT_ID; //saves a rendering call for the end-user acs.seoApi = false; })(window); </script>
<script type='text/javascript'> // Answers Cloud Services Embed Script v1.02 // DO NOT MODIFY BELOW THIS LINE ***************************************** ;(function (g) {var d = document, i, am = d.createElement('script'), h = d.head || d.getElementsByTagName('head')[0], aex = {'src': '//gateway.answerscloud.com/YOURSITECODE/production/gateway.mi n.js','type': 'text/javascript','async': 'true','data-vendor': 'acs','data-role': 'gateway'}; for (var attr in aex) { am.setAttribute(attr,aex[attr]); } h.appendChild(am);g['acsReady'] = function () {var aT = '__acsReady__', args = Array.prototype.slice.call(arguments, 0),k = setInterval(function () {if (typeof g[aT] === 'function') {clearInterval(k);for (i = 0; i < args.length; i++) {g[aT].call(g, functi on(fn) { return function() { setTimeout(fn, 1) };}(args[i]));}}}, 50);};})(window); // DO NOT MODIFY ABOVE THIS LINE ***************************************** </script>
<!-- End Shopper Ratings Product Detail Page Script -->

Controller Definitions:

acs.site_code = String (required) This is an ID given to you by Webcollage. This is the same on all pages.
acs.product_id = String (required) This is an ID unique to your product. (This matches your Webcollage product code, if applicable.)
acs.answ_category = String (required) Your category breadcrumb that has been ingested by the Webcollage team, e.g., Automobiles > Trucks > Full Cab.
ApiVersion = Integer (required) Version controller. The current version is 1.0.
ApiKey = String (required) This is a private key needed to talk the ACS servers. This key is provided by the Answer Project Manager.
CheckForSearchEngineBots = String (required) If true: SEO content is only rendered to a search engine bot.If false: SEO content is rendered to both search engine bots and end-users. (default)
MaxReviews = Integer (required) Defines the number of reviews to render to the search engine bots.
RequestTimeout = Integer (required) Defines server-side timeout.

Other articles in this section:

  1. Installing Shopper Answers
  2. Overview
  3. Overview
  4. Assigning Moderators
  5. Installing Shopper Ratings (current article)
  6. Final Deployment
  7. Shopper Ratings Setup
  8. Ratings Moderation
  9. Exporting Data
  10. Advanced Content Integration Guide