Shopper Approved Product Review Integration
If you haven't yet signed up for Shopper Approved, you can get started by either emailing us at [email protected], calling us at +1-888-951-7467 or booking a demo.
Once signed up, follow the steps below to begin your review collection. If you need help or would like us to handle the integration for you, reach out to [email protected].
Note: You must also be collecting store reviews with us to collect product reviews.
Step 1 - Provide us with your product feed
To get started with product review collection, we will first need to collect your current product feed and map that to our system. This step is required to collect product reviews. Our system needs to know what products you sell along with their strong identifiers so we can pass that information off to Google.
If you have a Google Shopping feed, it’s best to send that over to us as well for review, since we want to make sure your product feed matches exactly what Google has.
Here are the strong identifiers for a product feed:
Product ID
Product name
Product URL
Product Image URL
Brand
Manufacturer Part Number (MPN)
Global Trade Identification Number (GTIN)
Parent ID (item_group_id): This is used to aggregate the variations of a product so each review will aggregate at the parent level.
Note: If you don’t have a GTIN, then we MUST have a Brand AND MPN to show stars in your product listing ads. If you have all of these strong identifiers, it’s best to include them.
If your products are custom-made and you don’t have an MPN or GTIN, you can use the product ID as the MPN.
Why do we need all this information?
For us to ask your customers for a product review, we need to know what products they purchased. We will ask your customers to review the exact product they purchased, which includes the product name and image of the product, making it easier for them to remember what they bought. Furthermore, when the customer leaves a review, we associate that review with the specific product.
Secondly, we store the product reviews we collect on your behalf in our system and pass them to Google for syndication. For your review to count in Google and your product listing ads, Google needs to know exactly what product it is and what domain it comes from. By giving us these strong identifiers, it helps Google to identify which products the reviews go to and match them to your Google Shopping feed and product listing ads.
If you want to collect product reviews on all the products you sell, we will need a feed with all products. If you want to collect product reviews on only the products you have product listing ads on, the feed can be more limited.
Once you are ready to give us your product feed, you can log in to Shopper Approved and provide your product feed in one of two ways:
One-time feed upload: If you upload a CSV file, the file will be mapped one time. Any future products will not be included unless you upload a new file including those products.
Dynamic feed (recommended): If you have a hosted URL you can provide, you can set up a scheduled export of your products. Our system will read your feed weekly, and any changes you make to your feed will be automatically updated. Acceptable file types are CSV and XML.
Here is an example file for you to reference. To submit your product feed to our system, navigate to the main menu in the upper left-hand corner > Setup > Product Integration.
Note: It’s always best to have one of our support members review your product feed the first time to ensure it includes everything we need.
Once you have either uploaded the one-time feed or provided a dynamic URL, we will map your product feed to our system. This step must happen before you can start collecting product reviews.
For more information about product feeds, please see our Product Feeds Explained article.
Step 2 - Customize your survey settings
Double-check that your survey settings are still working for you. Follow this guide on customizing your surveys.
Step 3 - Add the product bolt-on code to your order confirmation page
To transfer information about a customer's purchases to our system, you will need to add the product bolt-on code. This code is designed to populate product details into the "sa_products" object on your order confirmation page. You can find the code example on the "Setup > Product Integration" page.
<script> var sa_products = { 'productid1':'Product Name 1', 'productid2':'Product Name 2', 'productid3':'Product Name 3' }; </script>
The best way to accomplish this would be to use a loop to go through the products that were purchased and then populate the key-value pairs of product id and product name into sa_products. Please see below for an example.
<script>
var sa_products = {};
for (i = 0; i < products.length; i++) {
sa_products[products[i].id]=products[i].name;
}
</script>
Best Practices
Pass the CHILD variant ID. Passing the parent ID can cause reviews to attach incorrectly which may cause syndication issues in most circumstances and could break Shopper Approved's ability to syndicate or display your product reviews. Do NOT pass the parent ID. If you need to, please contact [email protected]
Always escape Product Names. Failure to do so will break the script resulting in no feedback collection.
Make sure the variable will be ready and populated with data when the survey script loads. If the data is not present, a product review cannot be requested in the follow-up review request.
Step 4 - Place a Test Order
Next, place a test order to verify your integration is working as expected. Our How to Test Your Shopper Approved Survey guide walks you through the process, including how to verify the order information, submit a test review, and test the post-fulfillment survey.
Step 5 - Add product ratings to collection pages
Once you start collecting product reviews, you will want to display the star ratings and review count on your site. One location where you can display the product ratings is underneath the product on a collection page on a per-product level.
You will add code to the collection page once and then add divs to each category listing so the star rating and review count appear below each product. You can find this code under Widgets > Product Reviews > Product Category Stars. The code below will be loaded on the page one time.
Please note the default behavior is that if no reviews are found, no star containers will be shown. If you would like empty stars to show, please reach out to support at [email protected].
<script type="text/javascript"> function saLoadScript(src) { var js = window.document.createElement('script'); js.src = src; js.type = 'text/javascript'; document.getElementsByTagName("head")[0].appendChild(js); } saLoadScript("https://www.shopperapproved.com/widgets/group2.0/xxxxx.js"); </script>
You will then place the code below on each category listing, replacing product_id_here with the product ID for the respective product.
Note: This script should not be included on checkout pages, including the order confirmation page.
<div class="star_container product_id_here"></div>
Once you place the code, the category pages should display the star rating and review count.
Step 6 - Add Product Star Rating and Review Count Code to Product pages
Note: Before adding review widgets, you can customize them to match your website. Follow the style guide for reference.
You can find this code snippet under Widgets > Product Reviews > Product Page Stars & Reviews. Customize your stars and copy the code towards the bottom of the page once you're done. This code is only for one product on a product page.
You will configure your product stars and widgets and then copy and place the code.
You can select either small or big stars. Here is an example code snippet:
<div id="product_just_stars" class="reg aside"></div>
Step 7 - Customize your product page widget
Under Widgets > Product Reviews > Product Page Stars & Reviews, you can customize your display, sort, and schema settings. You will want to select how many product reviews you’d like to collect before displaying the product reviews. We will display Seller Reviews until reaching the threshold of Product Reviews you select in these settings.
Schema Setting
Note the setting, "Inject JSON-LD schema”.
If the schema on your site is currently in JSON-LD format and you have an @id attribute that contains the product URL, enable this setting to have the product review widget automatically inject the Aggregate Rating schema onto your product pages.
Note: Turning this feature on will enable your product reviews to be crawled by Google, so your ratings will show up in organic searches. Before turning this feature on, all non json_ld schema on your product pages should be removed.
If you are not sure about your existing schema or have any other questions related to schema, please reach out to [email protected], and our dedicated support team can advise you on what needs to be done to benefit from this schema.
Step 8 - Add Product Review Code
Now that you have your settings configured and your product review widget is customized, copy and paste the code snippet and paste it to the desired location of your website. You can find this code snippet under Widgets > Product Reviews > Product Page Stars & Reviews.
Here is an example code snippet. Please make sure to copy the code snippet within your dashboard.
<div id="SA_review_wrapper"></div><script type="text/javascript">var sa_product = '[PRODUCT ID]'; var sa_interval = 5000;function saLoadScript(src) { var js = window.document.createElement('script'); js.src = src; js.type = 'text/javascript'; document.getElementsByTagName("head")[0].appendChild(js); } if (typeof(shopper_first) == 'undefined') saLoadScript('//www.shopperapproved.com/widgets/xxxxx/product/'+sa_product+'/product-widget/yyyyyyyyyyy.js'); </script>
Note: You will have to replace the [PRODUCT ID] placeholder anywhere you place this code. Also, some carts will strip div tags with empty content. If this is the case, put a   in the empty divs to keep it from doing so.
Once your code is placed, and if you have collected product reviews, you should see the product reviews widget on the product page.
Step 9 - Add store review widgets (if needed)
If you haven't yet added all your store review widgets to your site, it's a good idea to do that as well. Follow our widgets guide for adding store review widgets.
Step 10 - Follow our best practices
Use our best practices guide to ensure that your Shopper Approved account is fully optimized to boost trust, visibility, and conversions.
You’re all set! If you have any questions about your integration, please reach out to [email protected].
Happy Collecting!





