Shopping.com Widget Instructions
The Shopping.com Widget provides publishers with a pre-formatted shopping content module requiring little to no technical expertise. Simply follow the steps outlined below, and shopping content will be automatically included in your page.
If you want to be paid for your referral leads, you will need to apply and be approved for API access to get your own apiKey and trackingId. Otherwise, feel free to use the demo credentials provided in the code below. For demo credentials for other countries, please look here.
1. Paste the following code in your web page source code at the location you would like the module added (Click 'view plain'.)
- <div>
- <div id="sdcWidgetContent"></div>
- <a href="http://www.shopping.com">
- <img style="border: none; margin: 0px; padding: 0px; height: 1px; width: 1px;" src="http://stat.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&APPV_LI_LNKINID=7000610&APPV_PRTID=2002&APPV_BrnID=14305" alt="Shopping.com"/>
- </a>
- </div>
- <script id="sdcWidgetGenerator" src="http://img.shopping.com/sc/pac/sdc_widget_v2.0_proxy.js"> </script>
- <script>
- <!--
- var sdcwidget = new ShopWidget();
- var sdcrequest = sdcwidget.requestParameters;
- // Widget Parameters
- // height and width can be absolute numbers or percentages (e.g. "540" or "80%")
- sdcwidget.height = "540";
- sdcwidget.width = "700";
- // designId options are "gallery", "listinglike" or "textlike"
- sdcwidget.designId = "gallery";
- // Request Parameters
- sdcrequest.apiKey = "78b0db8a-0ee1-4939-a2f9-d3cd95ec0fcc";
- sdcrequest.trackingId = "7000610";
- sdcrequest.keyword = ["womens jeans", "sony lcd tv"];
- //sdcrequest.categoryId = ["31515","7185","96602"];
- //sdcrequest.attributeValue = ["ap_gender_age_women||ap_types_pants||jeans",,"brand_nike"];
- //sdcrequest.productId = ["37716504","40940647"];
- //sdcrequest.offerId = [""];
- sdcwidget.render();
- //-->
- </script>
2. Update the widget parameters
To configure the widget, you will first need to choose a design and dimensions. Currently, 3 designs are available:
designId: 'gallery' suggested minimum height: 350 suggested minimum width: 640
designId: 'textlike' suggested minimum height: 520 suggested minimum widght: 700
designId: 'listinglike' suggested minimum height: 560 suggested minimum widght: 550
3. Update the request parameters
Shopping.com Widgets are not currently context sensitive (i.e. they don't automatically detect the content of your page), which means you will need to define the search parameters manually. You can either provide a static set of search parameters, or dynamically update these values based on user interactions (e.g. set the widget keyword to a keyword entered into your own sites search box by the user.)
All searches require a valid trackingId and apiKey. Additionally, you must provide at least one search parameter, the options being keyword, categoryId, productId, or offerId. A fifth search parameter, 'attributeValue' may be combined with categoryId and/or keyword, but cannot be used on it's own.
Except for categoryId, you can provide multiple values for any of the search parameters in a single request, separated by double pipes ('||'). This allows you to show results for multiple products, offers, or keywords in the same result. You can also provide multiple sets of values for any search parameter, which will cause the widget to rotate through those sets randomly for each new page view.
See below for a few examples of different request configurations.
1. Show results for a single keyword
- sdcrequest.keyword = ["womens jeans"];
2. Show results for a single category
- sdcrequest.categoryId = ["7185"];
3. Show results for a single keyword, category, attribute value combination
- sdcrequest.keyword = ["sony"];
- sdcrequest.categoryId = ["7185"];
- sdcrequest.attributeValue = ["ultra_compact"];
4. Show results for a single product
- sdcrequest.productId = ["40940647"];
5. Show results for a single offer
- sdcrequest.offerId = ["q_DA7Cut6RIpD486c4U2OQ=="];
6. Show results for a single keyword and category, with multiple attribute values
- sdcrequest.keyword = ["red"];
- sdcrequest.categoryId = ["31515"];
- sdcrequest.attributeValue = ["ap_gender_age_women||dresses"];
7. Show results for multiple products in the same response
- sdcrequest.productId = ["40940647||40741277"];
8. Show results for multiple offers in the same response
- sdcrequest.offerId = ["q_DA7Cut6RIpD486c4U2OQ==||78MFZvt8rlWDaXIR0doseg=="];
9. Rotate through results for multiple keywords
- sdcrequest.keyword = ["digital cameras", "lcd tvs"];
10. Rotate through results for multiple keyword, category and attributeValue combinations
- // The same set will be selected from keyword, categoryId, and attributeValue
- // when rotating, ensuring parameter combinations make sense. In this example,
- // there are three distinct sets:
- // (keyword="red", categoryId="31515", attributeValue=ap_gender_age_women||dresses)
- // (keyword="", categoryId="96602, attributeValue="brand_nike")
- // (keyword="grey aviator", categoryId="22686", attributeValue="")
- sdcrequest.keyword = ["red", ,"grey aviator"];
- sdcrequest.categoryId = ["31515", "96602","22686"];
- sdcrequest.attributeValue = ["ap_gender_age_women||dresses", "brand_nike"];
11. Rotate through results for multiple sets of products
- sdcrequest.productId = ["40940647||40741277", "28328722||84828538"];

Comments
Please sign in to post a comment.