Escolar Documentos
Profissional Documentos
Cultura Documentos
quick start
implementation
guide
Disclaimer
Copyright 2012 Bazaarvoice. All rights reserved.
The information in this document:
Is confidential and intended for Bazaarvoice clients. No part of this document may be shared with anyone outside
your company or your company-partners without prior approval from Bazaarvoice.
Is provided as is without warranty of any kind either expressed or implied, including, but not limited to the implied
warranties of merchantability, fitness for a particular purpose, or non-infringement.
Is periodically updated to be in sync with the improvements and/or changes in our product offers.
May be changed without notice. Some examples depicted herein are provided for illustration only and are not
guarantees of a specific result. You bear the risk of using this document.
Bazaarvoice is not liable for any technical or typographical errors that might be inadvertently present in this document.
Bazaarvoice might have patents and/or pending patent applications covering subject matter in this document. The
furnishing of this document does not give you any license to these patents, or legal rights to any other intellectual property
in any Bazaarvoice service or product.
All Bazaarvoice brand and product names are trademarks or registered trademarks of Bazaarvoice in the United States
and may be protected as trademarks or registered trademarks in other countries. All other product, service, or company
names mentioned here are claimed as trademarks and trade names by their respective companies.
Contact us:
3900 North Capital of Texas Highway
Suite 300, Austin, Texas 78746
Toll-Free: (866) 522-9227 | Phone: (512) 551-6000 | Fax: (512) 551-6001
www.bazaarvoice.com
TOC
Contents
Introduction..............................................................................................................................................6
Ratings and reviews......................................................................................................................................6
Question and answer....................................................................................................................................8
Campaigns..................................................................................................................................................9
Profiles.......................................................................................................................................................11
Prerequisites............................................................................................................................................13
Creating a subdomain for user-facing URLs.....................................................................................................13
Granting access to a development website....................................................................................................13
Providing a data feed..................................................................................................................................14
Integrating display features.......................................................................................................................15
Loading ratings and reviews content.............................................................................................................15
Loading question and answer content...........................................................................................................16
Integrating question and answer with product pages...........................................................................17
Integrating question and answer with category pages..........................................................................18
Loading campaigns content.........................................................................................................................18
Integrating campaigns with product pages.........................................................................................19
Integrating campaigns with category pages........................................................................................19
Loading profiles content..............................................................................................................................20
Adding the ROI beacon to transaction and conversion pages..........................................................................22
ROI beacon parameters...............................................................................................................................24
Rendering the submission container page...................................................................................................27
Implementing the submission container page..............................................................................................28
Implementing the login-redirection logic.......................................................................................................28
Rendering the submission container page.....................................................................................................30
Generating the user authentication string......................................................................................................30
Implementing Bazaarvoice SEO.................................................................................................................32
Create an automated process for daily tasks...................................................................................................32
Download and unpack SEO files........................................................................................................32
Inject SEO content on product pages.................................................................................................33
Ratings and reviews..............................................................................................................34
Question and answer............................................................................................................34
Campaigns..........................................................................................................................35
Perform a string replacement within the SEO files................................................................................36
Handle the SEO URL parameter.........................................................................................................36
Special case: When UGC is behind a tab........................................................................................................37
Verify your SEO implementation...................................................................................................................39
Implementation checklists.........................................................................................................................40
General checklist........................................................................................................................................40
Using advanced integration options............................................................................................................41
Loading the API asynchronously...................................................................................................................41
Implementing inline ratings.........................................................................................................................42
Method comparison........................................................................................................................43
Using the Bazaarvoice platform API for inline ratings (recommended approach)......................................43
Using ratings XML feed for inline ratings.............................................................................................44
Implementing login redirection with JavaScript..............................................................................................45
Integrating with AJAX-type login methods.....................................................................................................45
Bazaarvoice Confidential
TOC
Displaying content that resides behind a tab..................................................................................................46
Targeted link to Bazaarvoice content............................................................................................................47
Example formats: Targeted URLs.......................................................................................................47
Overriding redirect URLs..................................................................................................................48
Sharing content through Facebook...............................................................................................................49
Updating Facebook tags..................................................................................................................49
Creating an application for Facebook.................................................................................................50
Creating a new Facebook application.....................................................................................50
Using an existing Facebook application...................................................................................51
Same-page submission................................................................................................................................51
Implementing same-page submission with AJAX-type login methods.....................................................52
Implementing same-page submission with a separate login page..........................................................53
Implementing same-page submission................................................................................................55
Implementing ratings and reviews on your mobile site....................................................................................56
Using the event callback..............................................................................................................................56
Example: Event callback...................................................................................................................57
Event variables for ratings and reviews...............................................................................................57
Event variables for question and answer.............................................................................................58
Event variables for campaigns...........................................................................................................58
Event variables for all Bazaarvoice products........................................................................................59
Additional event variables................................................................................................................59
Appendix................................................................................................................................................64
JavaScript API details..................................................................................................................................64
Configuration calls..........................................................................................................................64
UI calls...........................................................................................................................................65
Ratings and reviews methods................................................................................................65
show_summary........................................................................................................65
show_reviews..........................................................................................................66
submit_review..........................................................................................................66
submit_comment......................................................................................................66
Question and answer methods..............................................................................................66
show_summary........................................................................................................67
show_questions.......................................................................................................67
show_search............................................................................................................67
submit_question.......................................................................................................68
submit_answer.........................................................................................................68
Campaigns methods............................................................................................................68
show_summary........................................................................................................68
show_stories............................................................................................................69
show_grid...............................................................................................................69
show_home.............................................................................................................69
submit_story............................................................................................................69
submit_comment......................................................................................................70
Profiles methods..................................................................................................................70
show_profile............................................................................................................70
submit_profile..........................................................................................................71
submission_container...........................................................................................................71
Additional configuration options.......................................................................................................71
Common display options.......................................................................................................71
Submission options..............................................................................................................73
Bazaarvoice Confidential
TOC
User authentication string options..........................................................................................74
Example: Integration code..........................................................................................................................75
Submission links.........................................................................................................................................76
Submission links for ratings and reviews.............................................................................................76
Submission links for question and answer...........................................................................................76
Submission links for campaigns.........................................................................................................78
Submission links for profiles..............................................................................................................79
Options for submission link parameters..............................................................................................79
Bazaarvoice Confidential
Introduction
This document describes the tasks that are associated with implementing one or more Bazaarvoice products or
solutions. The intended audience consists of developers who need to implement such a product or solution quickly
and easily for Example Client.
The steps in this document utilize the Bazaarvoice QuickStart method to complete a successful implementation.
With the QuickStart method, Bazaarvoice handles the majority of the development work while our tools integrate
seamlessly with your existing teams and workflows. A typical QuickStart implementation consists of the following
tasks:
1. Integrating the display features, which consists of the following subtasks:
a. Adding the Bazaarvoice JavaScript API.
b. Loading the appropriate Bazaarvoice content.
2. Rendering the submission container page.
3. Implementing the submission container page, which consists of the following subtasks:
a. Implementing the appropriate login-redirection logic.
b. Rendering the submission container page.
c. Generating the user authentication string (UAS).
You can rely upon the Bazaarvoice implementation team to provide detailed guidance and support for each step
in the implementation process. If you have questions about the Bazaarvoice side of your implementation, contact
your Bazaarvoice Implementation Project Manager (IPM) or Implementation Engineer (IE).
Bazaarvoice Confidential
Introduction
This document provides the information that you need to install and configure ratings and reviews. When you are
finished, the following components are added to your storefront:
Ratings summary Displays the overall rating of a product as well as information like the number of customers
who would recommend the product to a friend. The ratings summary also provides links for reading additional
reviews, writing a review, and sharing the relevant product through social networking sites like Facebook and
Twitter.
The following image shows an example ratings summary.
Primary display area Displays review-related content, as shown by the following image.
Bazaarvoice Confidential
If no questions or answers are currently available, a Be the first to ask a question link is displayed.
Bazaarvoice Confidential
Introduction
Primary display area Displays question- and answer-related content, as shown by the following image.
Campaigns
Bazaarvoice campaigns makes it easy for you to collect and display real contentsuch as stories, ideas, testimonials,
or recipesfrom real customers, highlighting the degree to which your brand fits into their lives and helping you
stand out among competing brands. With campaigns, authentic customer content lives on your site and can be
shared across social networks like Facebook and Twitter.
Bazaarvoice Confidential
Primary display area Displays question- and answer-related content, as shown by the following image.
10
Bazaarvoice Confidential
Introduction
Profiles
Bazaarvoice is committed to building online communities that drive measurable goals. With Bazaarvoice's profiles
feature, the opinions, knowledge, and experience of your most active customers come together to build trust in
your brand and to influence purchasing decisions. Profiles makes it easy to identify your most active contributors
by collecting uniform demographic information for each user and by displaying an aggregate of activity for each
user across all of your Bazaarvoice products.
In addition to featuring standard content like user nicknames, badges, and statistics, active profiles extends the
customer relationship by providing brand ambassadors with a platform for creating and maintaining an identity
on your site. Users are encouraged to include in their profiles personally descriptive information that they are
willing to share with the online community, as shown by the following examples:
Profile headline
Photos
Product recommendations
The ability to let customers include such information in their profiles is a feature that strengthens the community,
builds brand loyalty among your top customers, and increases the purchase likelihood for prospective buyers.
Bazaarvoice Confidential
11
12
Bazaarvoice Confidential
Prerequisites
Prerequisites
Ensure that the following prerequisites are satisfied before starting a Bazaarvoice integration:
Create a subdomain that points to Bazaarvoice servers for all user-facing URLs.
Grant Bazaarvoice access to a development website.
Provide Bazaarvoice with a production-ready data feed of your products.
The following sections describe these prerequisites in more detail.
Additionally, you must create the following, product-specific CNAME entries where appropriate:
For ratings and reviews, create the following CNAME entry:
reviews.example.com -> example.ugc.bazaarvoice.com
Bazaarvoice Confidential
13
Location
24.155.144.5
Austin, USA
24.155.144.36
Austin, USA
216.166.20.0/26
Austin, USA
80.169.157.170
London, UK
123.51.122.10
Sydney, Australia
Bazaarvoice requires this level of access to your staging environment even after the implementation is finished.
New features, bug fixes, and updates must be verified against the staging environment before they can be rolled
into our production environment.
14
Bazaarvoice Confidential
Where:
/bvstaging is removed from the URL before launching in your production environment.
$BV.configure calls are executed prior to any $BV.ui calls that they affect.
bvapi.js is not loaded asynchronously. If you need to load the API asynchronously, see the "Loading
the API Asynchronously" section for additional information. Asynchronous content loading is not common.
Note
For security reasons, Bazaarvoice configures a whitelist of allowable domains for your integration. If the
domain of the submissionContainerUrl is not included in the list, a warning page might appear when certain
links are clicked. This warning page is normal for development and staging purposes and is common if you
are developing against localhost, an IP, or another hostname of which Bazaarvoice is unaware.
After you confirm that the URL presented on the warning page is the URL that you want to use for development,
it is safe to pass through it. In production, Bazaarvoice must be made aware of all of the domains that you
plan to deploy. Additionally, the configured URLs must match the domains that you plan to deploy.
2. Place the following <div> element on every product page where you want to display the ratings summary:
<div id="BVRRSummaryContainer"></div>
Bazaarvoice Confidential
15
3. Place the following <div> element on every product page where you want to display the actual reviews:
<div id="BVRRContainer"></div>
4. Make the following $BV.ui() call to load content into the <div> elements that you inserted during the previous
step:
<script type="text/javascript">
$BV.ui("rr", "show_reviews", {
productId: "XXXXX"
});
</script>
where XXXXX represents the ID of the product that is displayed on the page. This value must match the ID that
is associated with the product in the data feed. We recommend that you place this code in the <head> element.
Related Links
Implementing the submission container page on page 28
Loading the API asynchronously on page 41
JavaScript API details on page 64
Where:
/bvstaging is removed from the URL before launching in your production environment.
$BV.configure calls are executed prior to any $BV.ui calls that they affect.
bvapi.js is not loaded asynchronously. If you need to load the API asynchronously, see the "Loading
the API Asynchronously" section for additional information. Asynchronous content loading is not common.
16
Bazaarvoice Confidential
Note
For security reasons, Bazaarvoice configures a whitelist of allowable domains for your integration. If the
domain of the submissionContainerUrl is not included in the list, a warning page might appear when certain
links are clicked. This warning page is normal for development and staging purposes and is common if you
are developing against localhost, an IP, or another hostname of which Bazaarvoice is unaware.
After you confirm that the URL presented on the warning page is the URL that you want to use for development,
it is safe to pass through it. In production, Bazaarvoice must be made aware of all of the domains that you
plan to deploy. Additionally, the configured URLs must match the domains that you plan to deploy.
2. Place the following <div> element on every product and category page that you want to display the questions
and answers summary:
<div id="BVQASummaryContainer"></div>
3. Place the following <div> element on every product and category page that you want to display the actual
questions and answers:
<div id="BVQAContainer"></div>
After you add the <div> elements to the appropriate product and category pages, proceed to the following topics
to integrate question and answer:
Integrating question and answer with product pages
Integrating question and answer with category pages
Related Links
Implementing the submission container page on page 28
Loading the API asynchronously on page 41
where XXXXX represents the ID of the product that is displayed on the page. This value must match the ID that
is associated with the product in the data feed. It is recommended that this code is placed in the <head>.
Bazaarvoice Confidential
17
where XXXXX represents the ID of the current pages category. This value must match the ID that is associated
with the category in the data feed. It is recommended that this code is placed in the <head>.
Where:
/bvstaging is removed from the URL before launching in your production environment.
$BV.configure calls are executed prior to any $BV.ui calls that they affect.
bvapi.js is not loaded asynchronously. If you need to load the API asynchronously, see the "Loading
the API Asynchronously" section for additional information. Asynchronous content loading is not common.
Note
For security reasons, Bazaarvoice configures a whitelist of allowable domains for your integration. If the
domain of the submissionContainerUrl is not included in the list, a warning page might appear when certain
links are clicked. This warning page is normal for development and staging purposes and is common if you
are developing against localhost, an IP, or another hostname of which Bazaarvoice is unaware.
After you confirm that the URL presented on the warning page is the URL that you want to use for development,
it is safe to pass through it. In production, Bazaarvoice must be made aware of all of the domains that you
plan to deploy. Additionally, the configured URLs must match the domains that you plan to deploy.
18
Bazaarvoice Confidential
2. Place the following <div> element on every product and category page that you want to display the campaign
summary:
<div id="BVSYSummaryContainer"></div>
3. Place the following <div> element on every product and category page that you want to display the content:
<div id="BVSYContainer"></div>
After you add the <div> elements to the appropriate product and category pages, proceed to the following topics
to integrate campaigns:
Integrating campaigns with product pages
Integrating campaigns with category pages
Related Links
Implementing the submission container page on page 28
Loading the API asynchronously on page 41
where XXXXX represents the ID of the product that is displayed on the page. This value must match the ID that
is associated with the product in the data feed. It is recommended that this code is placed in the <head>.
Related Links
JavaScript API details on page 64
Bazaarvoice Confidential
19
2. Make the following $BV.ui() call to load campaign-related content into the appropriate <div> elements:
<script type="text/javascript">
$BV.ui("sy", "show_stories", {
categoryId: "XXXXX",
subjectType: "category"
});
</script>
where XXXXX represents the ID of the current pages category. This value must match the ID that is associated
with the category in the data feed. It is recommended that this code is placed in the <head>.
Related Links
JavaScript API details on page 64
http://www.example.com/profile.html?user=USERID
http://www.example.com/profile/USERID
Where:
/bvstaging is removed from the URL before launching in your production environment.
$BV.configure calls are executed prior to any $BV.ui calls that they affect.
bvapi.js is not loaded asynchronously. If you need to load the API asynchronously, see the "Loading
the API Asynchronously" section for additional information. Asynchronous content loading is not common.
20
Bazaarvoice Confidential
Note
For security reasons, Bazaarvoice configures a whitelist of allowable domains for your integration. If the
domain of the submissionContainerUrl is not included in the list, a warning page might appear when certain
links are clicked. This warning page is normal for development and staging purposes and is common if you
are developing against localhost, an IP, or another hostname of which Bazaarvoice is unaware.
After you confirm that the URL presented on the warning page is the URL that you want to use for development,
it is safe to pass through it. In production, Bazaarvoice must be made aware of all of the domains that you
plan to deploy. Additionally, the configured URLs must match the domains that you plan to deploy.
2. Place the following <div> elements within a single block on your profile pages:
<div id="BVCPBodyAContainer"></div>
<div id="BVCPBodyBContainer"></div>
3. Make the following $BV.ui() call to load profile-related content into the <div> elements that you inserted
during the previous step:
<script type="text/javascript">
$BV.ui("cp", "show_profile", {
profileId: "XXXXX"
});
</script>
where XXXXX represents the user ID that is associated with the profile page. Obtain this value from the URL
that you defined earlier in this topic. Do not encode the user ID like it is encoded on the submission page. It
is recommended that this code is placed in the <head>.
For information about additional API calls and customization options, see JavaScript API details on page 64.
Related Links
Implementing the submission container page on page 28
Loading the API asynchronously on page 41
Bazaarvoice Confidential
21
Where:
22
/bvstaging is removed from the URL before launching in your production environment.
Bazaarvoice Confidential
2. For transaction pages, supply the following data using the sample format.
$BV.SI.trackTransactionPageView({
"orderId" : "55555",
// REQUIRED
"tax" : "1.44",
"shipping" : "10.00",
"total" : "40.84",
// REQUIRED
"city" : "Austin",
"state" : "TX",
"country" : "USA",
"currency" : "USD",
// ISO 4217 alphabetic currency code
"locale" : "en_US",
// Used to send locale-specific post-interaction email (PIE)
"items" : [
{
"sku" : "2245",
// REQUIRED - Must match SKU on product display page!
"name" : "product name",
"category" : "category name",
"price" : "13.42",
// Used to sort products in PIE
"imageURL" : "http://product/image/URL/1",
"quantity" : "1"
// REQUIRED
},
{
"sku" : "2245",
// REQUIRED - Must match SKU on product display page!
"name" : "product name",
"category" : "category name",
"price" : "13.42",
"imageURL" : "http://product/image/URL/2",
"quantity" : "1"
// REQUIRED
}
],
"userId" : "7448dc2",
// REQUIRED
"email" : "john@example.com", // REQUIRED
"nickname" : "john1981",
// REQUIRED
"gender" : "M"
});
Important!
The SKU (product ID) that you include in your transaction data must match the SKU that you provide to
Bazaarvoice on your product display page. If the SKUs don't match, our analytics engine cannot correlate
consumer behavior to conversion.
3. For conversion pages, supply the following data as JSON using the sample format.
$BV.SI.trackConversion({
"type": "StoreLocator",
"label": "ProductPage",
"value": 78701
});
For our non-transactional /non-commerce clients, we still recommend tracking against your most important
goal. Non-transactional conversion goal examples include:
Download complete
Store locator results
Warranty registration
Site registration
Bazaarvoice Confidential
23
Required
Description
Example
orderId
yes
"55555"
tax
no
"1.44"
shipping
no
"10.00"
total
yes
"40.84"
city
no
"Austin"
state
no
"TX"
country
no
"USA"
currency
no
items
yes
24
Parameter
Required
Description
Example
userId
Yes
"7448dc2"
locale
no
Yes
Bazaarvoice Confidential
"john@example.com"
Parameter
Required
Description
Example
nickname
Yes
gender
no
"M" or "F"
Important!
PII information:
is NEVER associated with the Bazaarvoice persistent cookie.
is ALWAYS transmitted over HTTPS.
is encrypted before writing to disk.
is NEVER processed by Bazaarvoice analytics.
Item parameters
Parameter
Required
Description
Example
sku
yes
The Bazaarvoice ExternalID of the item. Sometimes this is a SKU code "2245"
or ProductID, but it MUST match what you send to Bazaarvoice in
your product data feed for the <Product> <ExternalID>. If the
ExternalID you set for the sku parameter is NOT in your product data
feed, the product will NOT be included in the generated PIE that
goes to the consumer.
name
no
Product name.
"Black t-shirt"
Important!
Should match the value you provide to Bazaarvoice in the product
data feed.
category
no
Product category.
"Shirts"
Important!
Should match the value you provide to Bazaarvoice in the product
data feed.
price
no
Product price.
"13.42"
Important!
Must have only two fraction numbers after the decimal.
quantity
yes
Quantity purchased.
Bazaarvoice Confidential
"4"
25
Parameter
Required
Description
Example
imageUrl
yes
Conversion parameters
26
Parameter
Required
Description
Example
type
yes
"StoreLocator" or "Download"
label
no
"ProductPage" or "Product
Specifications - 1234.pdf"
value
yes
"78701" or "1"
Bazaarvoice Confidential
where XXXXX represents the Bazaarvoice-encoded UAS. If you do not have a value to place in this location,
leave it blank.
2. Place the following code where you want the submission form to appear:
<div id="BVSubmissionContainer"></div>
The Bazaarvoice submission form is loaded within the BVSubmissionContainer <div> element.
Related Links
Generating the user authentication string on page 30
Bazaarvoice Confidential
27
28
Bazaarvoice Confidential
The sections that are labeled Client controlled actions identify the behaviors that you are responsible for
implementing.
Bazaarvoice Confidential
29
where XXXXX represents the Bazaarvoice-encoded UAS. If you do not have a value to place in this location,
leave it blank.
2. Place the following code where you want the submission form to appear:
<div id="BVSubmissionContainer"></div>
The Bazaarvoice submission form is loaded within the BVSubmissionContainer <div> element.
Related Links
Generating the user authentication string on page 30
30
Key
Description
Required
date
Yes
maxage
Number of days before the UAS expires. The default number of days is 1. Increasing this value No
is useful in pre-authenticated URLs, such as the URLs that are used in email campaigns.
userid
Bazaarvoice Confidential
Yes
The final value of encUser represents the value of userToken that is used to integrate the body of the submission
page.
To obtain code examples that pertain to the generation of the encoded UAS for login integration, see "Example:
Integration Code."
Related Links
User authentication string options on page 74
Rendering the submission container page on page 27
Example: Integration code on page 75
Bazaarvoice Confidential
31
feeds/<ClientName>_smartseo.zip
feeds/<ClientName>_smartseo.zip.ready
Verify that the .ready file exists, then download the .zip file and extract its contents.
Note
The .ready file is created to notify you that the .zip is completely uploaded.
32
Bazaarvoice Confidential
Folder
Directory*
R&R
reviews
{DisplayCode}/reviews/product/1/001122.htm
Q&A
questions
{DisplayCode}/questions/product/1/112233.htm
OR
{DisplayCode}/questions/category/1/112233.htm
Campaigns
stories
{DisplayCode}/stories/category/1/stories/112233.htm
* In each directory, DisplayCode represents your unique display code, such as 1234-en_us.
Files in these directories are named SUBJECTID.htm, where SUBJECTID represents the URL-encoded ID of a product
or category. For example, a product that features reviews and has an ID of 00+1122, generates the following file
name:
{DisplayCode}/reviews/product/1/00%2B1122.htm
Bazaarvoice Confidential
33
The following example represents the content that must be added to this element on a product display page for
a product with an ID of 001122:
<div id="BVRRContainer">
<!-- include contents of {DisplayCode}/reviews/product/1/001122.htm if it exists -->
</div>
The following code represents the content that must be added to this element for a product with an ID of 001122:
<div id="BVQAContainer">
<!-- include contents of {DisplayCode}/questions/product/1/001122.htm if it exists -->
</div>
34
Bazaarvoice Confidential
Campaigns
The following <div> element represents the default main content for campaigns:
<div id="BVSYContainer"></div>
The following code represents the content that must be added to this element for a product with an ID of 001122:
<div id="BVSYContainer">
<!-- include contents of {DisplayCode}/stories/product/1/stories/001122.htm
</div>
if it exists -->
API Options
show_stories
subjectType: "category"
{DisplayCode}/stories/category/1/sto
ries/112233.htm
show_stories
subjectType: "product"
{DisplayCode}/stories/product/1/sto
ries/112233.htm
show_grid
subjectType: "category"
{DisplayCode}/stories/category/1/stories
grid/112233.htm
show_grid
subjectType : "product"
{DisplayCode}/stories/product/1/stories
grid/112233.htm
show_home
subjectType: "category"
{DisplayCode}/stories/category/1/storiessub
grid/112233.htm
show_home
subjectType: "all"
{DisplayCode}/stories/category/1/allstoriessub
grid/allstoriessubgrid.htm
* In each SEO file name, {DisplayCode} represents your unique display code. In each file name, 112233 represents
a sample category or product ID.
Bazaarvoice Confidential
35
where DisplayCode represents your unique display code. In this example, the ? immediately precedes the bvrrp
parameter.
If the current page's URL already includes URL parameters, such as http://www.example.com/product.htm?id=6789,
the link resembles the following example after the string replacement:
<a href="http://www.example.com/product.htm?id=6789&bvrrp={DisplayCode}/reviews/prod
uct/2/6789.htm">2</a>
where DisplayCode represents your unique display code. In this example, the & immediately precedes the bvrrp
parameter.
Conduct this string-replacement operation whenever you include any SEO files on your page.
Default Parameter
Example Value*
Reviews
bvrrp
{DisplayCode}/reviews/product/2/6789.htm
bvqap
{DisplayCode}/questions/product/2/6789.htm
Campaigns
bvsyp
{DisplayCode}/reviews/stories/2/sto
ries/6789.htm
36
Bazaarvoice Confidential
Bazaarvoice Confidential
37
=
=
=
=
'none';
'none';
'none';
'none';
38
Bazaarvoice Confidential
Bazaarvoice Confidential
39
Implementation checklists
This section contains checklists to help you verify that you have completed the steps necessary to implement a
Bazaarvoice product successfully.
General checklist
Use the following checklist to verify that your Bazaarvoice product or products are implemented correctly.
Make sure that the submission page URL has been sent to your Bazaarvoice IE. Include production and staging versions
of the URL.
If content is hidden behind a tab or other conditionally visible UI element on your product and category pages, make
sure that the steps in Displaying content that resides behind a tab on page 46 have been followed.
While not logged in to the system, test the submission link URLs first by specifying and then by not specifying a user. If
the login function is working properly, the submission link does not force a login attempt when you specify a user. For
more information, see Submission links on page 76.
Make sure that your product data feed with production data is being sent to Bazaarvoice's production FTP or SFTP
server. For more information, refer to the Bazaarvoice Product Feed document.
When launching to production, ensure that /bvstaging is removed from all Bazaarvoice URLs.
40
Bazaarvoice Confidential
Bazaarvoice Confidential
41
All subsequent calls to Bazaarvoice API functions, such as $BV.ui(), are wrapped in loadBazaarvoiceApi calls, as
the following example shows:
loadBazaarvoiceApi(function() {
$BV.ui("rr", "show_reviews", { productId: "test1" });
});
Bazaarvoice Confidential
Method comparison
Platform API
Lower
Higher
Statistics freshness
Real-time updates
No
Yes
Format
XML or JSON
XML only
1. Request production and staging platform API keys for inline ratings use from your Implementation Engineer.
2. Use the appropriate product ID to call the platform API to request review statistics
Bazaarvoice Confidential
43
Production:
http://example.ugc.bazaarvoice.com/data/statistics.json?apiversion=5.1&passkey=[api
key]&filter=productid:[product id]&stats=reviews
Staging:
http://example.ugc.bazaarvoice.com/bvstaging/data/statistics.json?apiver
sion=5.1&passkey=[api key]&filter=productid:[product id]&stats=reviews
The following example retrieves the star image for 3.1 out of 5 stars:
http://example.ugc.bazaarvoice.com/1234-en_us/3_1/5/rating.gif
4. Utilize the API response and star image to display the inline rating image and overall rating value as needed
on your category or search listing page.
44
Bazaarvoice Confidential
where XXXXX represents the Bazaarvoice-encoded UAS. For more information, see "Generating the User
Authentication String."
If an appropriate value is unavailable, leave this value blank.
2. Replace the value of doLogin with the function that is called when Bazaarvoice requires user authentication.
After a successful login attempt on a separate page, the user is redirected back to the value of successUrl. The
code in step 1 provides an example of redirecting to a login page that features a defined return URL.
Related Links
Generating the user authentication string on page 30
User authentication string options on page 74
container page.
Bazaarvoice Confidential
45
1. Place the following example code in the <head> section on every page that you want to display Bazaarvoice
content:
<script type="text/javascript"
src="//example.ugc.bazaarvoice.com/bvstaging/static/1234-en_us/bvapi.js">
</script>
<script type="text/javascript">
$BV.configure("global", {
userToken: "XXXXX",
doLogin: function(successCallback, successUrl) {
myExampleAjaxLogin(function myExampleAfterLogin(encoded_user_string) {
successCallback(encoded_user_string);
});
},
});
</script>
<script type="text/javascript">
$BV.ui("rr", "show_reviews", {
productId: "XXXXX",
doShowContent: function() {
myExampleShowTab("#ReviewsTab");
}
});
</script>
Although the preceding example code pertains to a ratings and reviews integration, the manner in which doShow
Content specifies a function applies to all feature integrations.
When the primary content container needs to be visible, Bazaarvoice calls the function that is specified by
doShowContent. In the previous example, this function calls myExampleShowTab.
doShowContent supports asynchronous operations. A common need for such operations involves the inclusion of
functions from popular JavaScript libraries, such as jQuery. Additionally, the function can be configured with
46
Bazaarvoice Confidential
The following table identifies possible values for the source object.
If the value is...
readLink
deepLink
A targeted URL
submission
Use these values to prevent specific content-focusing actions, depending on the events that trigger them.
In this example, XXXXX represents the product ID, and YYYYY represents the review ID.
Bazaarvoice Confidential
47
In this example, XXXXX represents the product ID, YYYYY represents the review ID, and ZZZZZ represents the review
comment ID.
Questions
The following URLs show the format of a URL that deep links to a question:
http://answers.example.com/bvstaging/answers/1234-en_us/product/XXXXX/question/YYYYY/redirect.htm
http://answers.example.com/bvstaging/answers/1234-en_us/category/XXXXX/question/YYYYY/redirect.htm
In these examples, XXXXX represents the product or category ID, and YYYYY represents the question ID.
Answers
The following URLs show the format of a URL that deep links to an answer:
http://answers.example.com/bvstaging/answers/1234-en_us/product/XXXXX/answer/YYYYY/redirect.htm
http://answers.example.com/bvstaging/answers/1234-en_us/category/XXXXX/answer/YYYYY/redirect.htm
In these examples, XXXXX represents the product or category ID, and YYYYY represents the answer ID.
Campaigns
The following URLs show the format of a URL that deep links to campaign content:
http://stories.example.com/bvstaging/stories/1234-en_us/product/XXXXX/story/YYYYY/redirect.htm
http://stories.example.com/bvstaging/stories/1234-en_us/category/XXXXX/story/YYYYY/redirect.htm
In these examples, XXXXX represents the product or category ID, and YYYYY represents the campaign content ID.
Campaign comments
The following URLs show the format of a URL that deep links to a comment on a piece of campaign content:
http://stories.example.com/bvstaging/stories/1234-en_us/product/XXXXX/story/YYYYY/com
ment/ZZZZZ/redirect.htm
http://stories.example.com/bvstaging/stories/1234-en_us/category/XXXXX/story/YYYYY/com
ment/ZZZZZ/redirect.htm
In these examples, XXXXX represents the product or category ID, YYYYY represents the campaign content ID, and
ZZZZZ represents the comment ID.
48
Bazaarvoice Confidential
Ensure that /bvstaging is removed from the URL before launching in your production environment.
If other namespaces or attributes are already defined within the opening <html> element, leave them intact.
Social Buttons
Social buttons allows your customers to bookmark content that they want to share with their social networks.
Bookmarks appear in the Bazaarvoice-supported locations of your choice, as the following image shows.
Bazaarvoice Confidential
49
where ZZZZZ represents the URL that points to the image you want Facebook to use as the thumbnail.
For additional information, visit http://developers.facebook.com/docs/share.
Bazaarvoice Confidential
b) In the Site Domain text box, specify the appropriate domain in the following format:
example.com
Same-page submission
Same-page submission allows you to use a single page for both the display and submission of UGC.
The following topics describe the JavaScript functions that handle login duties, populate the submission <iframe>
element, and manage the page display:
AJAX-type login method
Bazaarvoice Confidential
51
52
Bazaarvoice Confidential
Bazaarvoice calls this function after submission is completed. This function can be used to close lightboxes
or to switch away from the tab into which the submission form was loaded.
6. Replace the value of doScrollSubmission with a function of your design.
Bazaarvoice calls this function after the submission form is displayed/updated. This function can be used to
prevent the default scrolling behavior by returning false.
7. Place the following <div> element where you want the submission form to load on your product or category
page.
<div id="BVSubmissionContainer"></div>
Alternatively, to load the submission form into a different <div> element, such as the <div> in which the main
Bazaarvoice content loads, override the submission <div> name as shown by the following example for
ratings and reviews.
$BV.ui("rr", "show_reviews", {productId: "A1234", submissionContainerDiv: "BVRRContainer"});
When this code is used in conjunction with the example $BV.configure, Write a Review links cause the
submission form to load in the location that displays the main block of reviews.
$BV.configure calls must be made prior to any $BV.ui calls that they affect.
Related Links
Implementing the submission container page on page 28
Generating the user authentication string on page 30
User authentication string options on page 74
Bazaarvoice Confidential
53
the user is redirected, onSubmissionReturn is not called. Instead, the page is refreshed with the URL before
the user is redirected to the login page. Define submissionReturnUrl to override this URL.
6. Replace the value of doScrollSubmission with a function of your design.
Bazaarvoice calls this function after the submission form is displayed/updated. This function can be used to
prevent the default scrolling behavior by returning false.
7. Place the following <div> element where you want the submission form to load on your product or category
page.
<div id="BVSubmissionContainer"></div>
Alternatively, to load the submission form into a different <div> element, such as the <div> in which the main
Bazaarvoice content loads, override the submission <div> name as shown by the following example for
ratings and reviews.
$BV.ui("rr", "show_reviews", {productId: "A1234", submissionContainerDiv: "BVRRContainer"});
When this code is used in conjunction with the example $BV.configure, Write a Review links cause the
submission form to load in the location that displays the main block of reviews.
$BV.configure calls must be made prior to any $BV.ui calls that they affect.
54
Bazaarvoice Confidential
Alternatively, to load the submission form into a different <div> element, such as the <div> in which the main
Bazaarvoice content loads, override the submission <div> name as shown by the following example for
ratings and reviews.
$BV.ui("rr", "show_reviews", {productId: "A1234", submissionContainerDiv: "BVRRContainer"});
Bazaarvoice Confidential
55
When this code is used in conjunction with the example $BV.configure, Write a Review links cause the
submission form to load in the location that displays the main block of reviews.
$BV.configure calls must be made prior to any $BV.ui calls that they affect.
Related Links
Implementing the submission container page on page 28
Ensure that you add the displayType configuration option only to the display and submission pages that you
want to render as the mobile-optimized version of ratings and reviews. Do not set this option to mobile for
every display and submission page, as the non-mobile-optimized version of ratings and reviews must be
able to render on your non-mobile site.
3. You can use simple submission URLs to direct users to the mobile version of the review submission form. To
do so, set format query string parameter to a value of "mobilestandalone". Example: http://re
views.client.com/1234/productXYZ/writereview.htm?return=http%3A%2F%2Fwww.client.com%2Fproduc
tXYZ.html&format=mobilestandalone
56
Bazaarvoice Confidential
Value
Description
numReviews
Integer
numRatingsOnlyReviews
Integer
percentRecommend
Integer (0-100)
avgRating
Float
Bazaarvoice Confidential
57
Value
Description
numQuestions
Integer Total number of approved questions that are submitted about the subject.
numAnswers
Integer Total number of approved answers that are submitted about the subject.
Example
<script type="text/javascript">
$BV.ui("qa", "show_questions", {
productId: "XXXXX",
subjectType: "product",
onEvent: function(json) {
alert(json.attributes.numQuestions);
}
});
</script>
58
Bazaarvoice Confidential
Value
Description
mediaType
String
Indicates that a visitor clicked hosted media within a piece of Bazaarvoice content. Possible values
are photo and video.
filterType
String
Indicates that a visitor clicked Filter By or Sort By and then selected a filter. Possible
values are as follows:
Date Newest First
Expert Reviews First
Photo Reviews First
Example
Update for current topic.
<script type="text/javascript">
$BV.ui("qa", "show_questions", {
productId: "XXXXX",
subjectType: "product",
onEvent: function(json) {
alert(json.attributes.numQuestions);
}
});
</script>
Values
Description
attributes
bvProduct
RatingsAndReviews
AskAndAnswer
Stories
Profiles
Bazaarvoice Confidential
59
Variable
Values
Description
eType
Read
Write
Support
Display
Action
Review
Question
Answer
Comment
Profile
Story
leafCategoryId
Alphanumeric
Input
Preview
Confirm
eventSource
eventTarget
60
Bazaarvoice Confidential
Variable
Values
Description
Cancelled
AuthenticationFailure
Expired
AlreadySubmitted
Own
Duplicate
ValidationError
productId
Alphanumeric
rootCategoryId
Alphanumeric
Variable
Values
Description
attributes
bvProduct
RatingsAndReviews
AskAndAnswer
Stories
Profiles
Read
Write
Support
eType
Bazaarvoice Confidential
61
Variable
Values
Description
eventSource
Display
Action
Review
Question
Answer
Comment
Profile
Story
leafCategoryId
Alphanumeric
Input
Preview
Confirm
Cancelled
Expired
AlreadySubmitted
Own
Duplicate
ValidationError
productId
Alphanumeric
rootCategoryId
Alphanumeric
eventTarget
62
Bazaarvoice Confidential
The following code runs whenever a user clicks a link or performs another action in ratings and reviews.
<script type="text/javascript">
$BV.ui("rr", "show_reviews", {
onEvent: function(json) {
if ( json.eventSource == "Action" ) {
alert("User click happened");
}
}
});
</script>
Bazaarvoice Confidential
63
Appendix
The sections in this appendix provide information about the following topics:
Bazaarvoice JavaScript API
Submission links
The following types of calls are available after the loader is added:
Configuration calls
UI calls
Configuration calls
Make the following configuration call to set the default values for later UI calls:
$BV.configure(scope, config);
scope Identifies the degree to which the configuration options are applied, as specified by the following
values:
config Simple JavaScript object that contains applicable configuration options or parameters.
64
Bazaarvoice Confidential
Appendix
Related Links
Additional configuration options on page 71
UI calls
Make the following UI call to trigger an action or to load content:
$BV.ui(scope, method, config);
scope Identifies the degree to which the configuration options are applied, as specified by the following
values:
config Simple JavaScript object that contains applicable configuration options or parameters.
The following topics identify available methods as well as the required and optional configuration parameters with
which they are coupled.
Related Links
Additional configuration options on page 71
show_summary
The show_summary method loads content into the summary containers.
Required Parameter
productId
Optional Parameters
The optional parameters for show_summary are identical to the common parameters that are described in "Common
Display Options."
Example
$BV.ui("rr", "show_summary", {productId: "A1234"});
Bazaarvoice Confidential
65
show_reviews
The show_reviews method loads content into the summary and content containers.
Required Parameter
productId
Optional Parameters
reviewId, page, num, sort, dir, sourceName, scrollToTop, suppressScroll, expandContextDataDimensionFilter,
expandBadgeGroupFilter, expandTagDimensionFilter, expandOverallRatingFilter, expandRatingDimensionFilter,
expandContentSourceFilter, commentId, showComments, hideComments, commentPage, commentNum, contextDataValues,
badges, tags, rating, ratings, contentSource, and all common parameters.
Example
$BV.ui("rr", "show_reviews", {productId: "A1234"});
submit_review
The submit_review method starts the process of submitting a review, such as when a user clicks Write a review.
Required Parameters
Either productId or chooseProduct.
Optional Parameters
The optional parameters for submit_review are identical to the common parameters.
Examples
$BV.ui("rr", "submit_review", {productId: "A1234"});
submit_comment
The submit_comment method starts the process of submitting a review comment, such as when a user clicks Comment
on this review.
Required Parameters
productId and reviewId.
Optional Parameters
The optional parameters for submit_comment are identical to the common parameters.
Example
$BV.ui("rr", "submit_comment", {productId: "A1234"});
66
Bazaarvoice Confidential
Appendix
show_summary
The show_summary method loads content into the summary containers.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
The optional parameters for show_summary are identical to the common parameters that are described in "Common
Display Options."
Examples
$BV.ui("qa", "show_summary", {subjectType: "product", productId: "A1234"});
Related Links
Common display options on page 71
show_questions
The show_questions method loads content into the summary and content containers.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
page, num, sort, dir, expandQuestion, expandAnswer, scrollToTop, and all common parameters.
Examples
$BV.ui("qa", "show_questions", {subjectType: "product", productId: "A1234"});
show_search
The show_search method loads content into the summary and content containers with the question and answer
Search tab visible.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
search, searchPage, num, searchCategoryId, searchCategory, expandQuestion, expandAnswer, scrollToTop, and
Bazaarvoice Confidential
67
submit_question
The submit_question method starts the process of submitting a question, such as when a user clicks Ask a question.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
The optional parameters for submit_question are identical to the common parameters.
Examples
$BV.ui("qa", "submit_question", {subjectType: "product", productId: "A1234"});
submit_answer
The submit_answer method starts the process of submitting an answer, such as when a user clicks Answer this
question.
Required Parameters
Either subjectType and productId or categoryId and questionId.
Optional Parameters
The optional parameters for submit_answer are identical to the common parameters.
Examples
$BV.ui("qa", "submit_answer", {subjectType: "product", productId: "A1234", questionId: 54321});
Campaigns methods
The campaigns methods correspond to the scope value of sy.
show_summary
The show_summary method loads content into the summary containers.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
The optional parameters for show_summary are identical to the common parameters that are described in "Common
Display Options."
Examples
$BV.ui("sy", "show_summary", {subjectType: "product", productId: "A1234"});
68
Bazaarvoice Confidential
Appendix
Related Links
Common display options on page 71
show_stories
The show_stories method loads content into the summary and content containers.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
storyId, page, num, sort, dir, scrollToTop, suppressScroll, expandContextDataDimensionFilter, expandBadge
GroupFilter, expandTagDimensionFilter, commentId, showComments, hideComments, commentPage, commentNum,
contextDataValues, badges, tags, and all common parameters.
Examples
$BV.ui("sy", "show_stories", {subjectType: "product", productId: "A1234"});
show_grid
The show_grid method loads the campaigns grid into the summary and content containers.
Required Parameters
subjectType, productId, or categoryId.
Optional Parameters
page, sort, dir, scrollToTop, expandContextDataDimensionFilter, expandBadgeGroupFilter, expandTagDimension
Filter, contextDataValues, badges, tags, and all common parameters.
Examples
$BV.ui("sy", "show_grid", {subjectType: "product", productId: "A1234"});
show_home
The show_home method loads the All Content subject grid into the summary and content containers.
Optional Parameters
subjectType, categoryId, scrollToTop, and all common parameters.
Examples
$BV.ui("sy", "show_home", {subjectType: "all"});
submit_story
The submit_story method starts the process of submitting content, such as when a user clicks Write content.
Bazaarvoice Confidential
69
Optional Parameters
The optional parameters for submit_story are identical to the common parameters.
Examples
$BV.ui("sy", "submit_story", {subjectType: "product", productId: "A1234"});
submit_comment
The submit_comment method starts the process of submitting a comment, such as when a user clicks Comment on
this campaign content.
Required Parameters
Either subjectType and productId or categoryId and storyId.
Optional Parameters
The optional parameters for submit_comment are identical to the common parameters.
Examples
$BV.ui("sy", "submit_comment", {subjectType: "product", productId: "A1234", storyId: 54321});
Profiles methods
The profiles methods correspond to the scope value of cp.
show_profile
The show_profile method loads profiles content into the profile content containers.
Required Parameter
profileId
Optional Parameters
The optional parameters for show_profile are identical to the common parameters that are described in "Common
Display Options."
Example
$BV.ui("cp", "show_profile", {profileId: "sampleuser7890"});
70
Bazaarvoice Confidential
Appendix
Related Links
Common display options on page 71
submit_profile
The submit_profile method starts the process of editing or submitting a profile, such as when a user clicks Edit
my profile.
Optional Parameters
The optional parameters for submit_profile are identical to the common parameters.
Example
$BV.ui("cp", "submit_profile");
submission_container
The submission_container method does not include a scope parameter but can contain a config parameter.
Required Parameters
Unless anonymous submission is enabled, either doLogin or userToken is a required parameter for the submis
sion_container method.
Optional Parameters
The optional parameters for submission_container are identical to the submission parameters that are described
in Submission options on page 73.
Example
$BV.ui("submission_container", {userToken: "ABCDEF123456789ABCDEF123456789"});
Description
contentContainerDiv
ID or DOM element that identifies the <div> element associated with the main content.
The default value is BV<Product>Container.*
Bazaarvoice Confidential
71
Option
Description
displayCode
Display code to use with the API call. The default value is the value that is used in the
bvapi.js URL.
doShowContent
Function that is called when Bazaarvoice needs to ensure the visibility of the <div>
element that is associated with the main content. For more information, see Displaying
content that resides behind a tab on page 46.
onEvent
Function that is called when Bazaarvoice events occur. For more information, see Ex
ample: Event callback on page 57.
secondarySummaryContainerDiv
ID or DOM element that identifies the <div> element associated with the secondary
summary content. The default value is BV<Product>SecondarySummaryContainer.*
submissionReturnUrl
URL to which one must link after a user completes a submission that was triggered by
a Bazaarvoice link on the page. The default value is the URL of the current page minus
the #anchors.
summaryContainerDiv
ID or DOM element that identifies the <div> element associated with the summary
content. The default value is BV<Product>SummaryContainer.*
submissionContainerUrl
URL to which a user is redirected for submission purposes; must contain the submission
integration code. The default value is specified in the Bazaarvoice configuration files.
* <Product> represents the relevant Bazaarvoice feature and is one of the following values:
SY campaigns
CP profiles
Example
The following code provides an example of a $BV.configure call that utilizes these options.
<script type="text/javascript">
$BV.configure("rr", {
contentContainerDiv: "BVRRContainerCustom",
displayCode: "1234-en_us",
doShowContent: function() {
myExampleShowTab("Reviews");
},
onEvent: function(json) {
if (json.eventSource == "Action") {
myExampleAnalyticsTrackEvent("Bazaarvoice interaction happened");
}
},
secondarySummaryContainerDiv: "BVRRSecondarySummaryContainerCustom",
submissionReturnUrl: "http://www.example.com/XXXXX.html",
summaryContainerDiv: "BVRRSummaryContainerCustom",
submissionContainerUrl: "http://www.example.com/submissionPage.html"
});
</script>
72
Bazaarvoice Confidential
Appendix
Submission options
The following table identifies the configuration options that pertain to submission pages and can be used in
$BV.configure and $BV.ui API calls.
Option
Description
allowSamePageSubmission
canSetPageTitle
Controls whether the submission form sets the title of the page. The default value is
true.
doLogin
Function that is called when content is submitted but Bazaarvoice is not passed a
required value for userToken; useful for implementing an AJAX-type login method.
doLogin is passed the successCallback and successUrl parameters. Upon a
doScrollSubmission
Function that is called every time Bazaarvoice updates the submission state; useful
if the default scrolling behavior must be customized. For example, doScrollSubmis
sion is called after the Edit page loads, on the Preview page, or if the edit page
reloads with errors.
To prevent the default scrolling behavior, this function must return false.
doShowSubmission
Function that is called before Bazaarvoice injects its submission form; useful if an
event must occur before the submission form appears, such as displaying a lightbox
that contains the form.
facebookXdChannelUrl
If the submission page allows for sharing content on Facebook, specify the URL of
the Facebook cross-domain communication channel as the value for this option. For
more information, see Sharing content through Facebook on page 49.
onEvent
Function that is called when Bazaarvoice events occur. For more information, see
Example: Event callback on page 57.
onSubmissionReturn
Function that is called at the end of the submission process; useful for closing
lightboxes or switching tabs after a submission is complete.
submissionContainerDiv
ID or DOM element that identifies the <div> element associated with the submission
form. The default value is BVSubmissionContainer.
submissionLoadingTimeout
submissionSessionParameters
String that, if specified on the submission container page, is saved to the database
along with the submitted content.
Bazaarvoice Confidential
73
Option
Description
submissionUnavailableMessage
String that is displayed if the submission form does not load before the
submission-loading timeout expires. The default value is Submission Currently
Unavailable.
userToken
The encoded UAS for the user who is currently logged in to the system. If this value
is unknown, leave it blank. For more information, see Generating the user authenti
cation string on page 30.
Example
The following code provides an example of a $BV.ui call that utilizes these options.
<script type="text/javascript">
$BV.ui("submission_container", {
allowSamePageSubmission: true,
canSetPageTitle: false,
doLogin: function(successCallback, successUrl) {
myExampleAjaxLogin(function myExampleAfterLogin(encoded_user_string) {
successCallback(encoded_user_string);
});
},
doShowSubmission: function() {
myExampleShowLightbox("Submission");
},
facebookXdChannelUrl: "/static/facebook_xd_receiver.htm",
onEvent: function(json) {
if (json.eventSource == "Action") {
myExampleAnalyticsTrackEvent("Bazaarvoice interaction happened");
}
},
onSubmissionReturn: function() {
myExampleCloseLightbox("Submission");
},
submissionContainerDiv: "BVSubmissionContainerCustom",
submissionLoadingTimeout: 20000,
submissionSessionParameters: "custom text",
submissionUnavailableMessage: "We're sorry, submission is currently unavailable. Please
try again later.",
userToken: "XXXXX"
});
</script>
74
Key
Description
Required
Requires Bazaarvoice To
Enable
affiliation
No
Yes
date
Yes
No
emailaddress
No
Yes
Bazaarvoice Confidential
Appendix
Key
Description
Required
maxage
Requires Bazaarvoice To
Enable
No
Yes
subjectids
Identifies the product IDs used in verified purchaser badging. For Yes, if
one product, use the form subjectids=test1. For multiple
verified
purchaser
products, use the form subjectids=test1/test2/test3.
badging
enabled
No
userid
Yes
No
username
Yes, if
enabled
Yes
verifiedpur
chaser
No
Bazaarvoice Confidential
75
Submission links
Bazaarvoice generates submission links as part of the hosted implementation. However, submission links can also
be generated outside that context, if necessary. For example, you might want to use submission links outside
Bazaarvoice-generated display components during the following scenarios:
Email campaigns that contain calls to action, such as encouraging customers to write reviews about products
that they purchased
Campaign pages that focus on driving UGC
Submission links within site navigation
Additional submission links outside the default Bazaarvoice components on your product and category pages
Submissions can be triggered either by the Bazaarvoice JavaScript API or by constructing an appropriate URL, as
the example formats in the following sections show.
where XXXXX represents the product ID and OPTIONS represents with the appropriate URL options.
Ensure that /bvstaging is removed from the example URL before launching within your production
environment.
Related Links
Options for submission link parameters on page 79
76
Bazaarvoice Confidential
Appendix
JavScript API calls
Make the following JavaScript API calls to trigger the submission of a question on a product or category page:
To trigger the submission of a question on a product page:
$BV.ui("qa", "submit_question", {subjectType: "product", productId: "XXXXX"});
where XXXXX represents the product ID and YYYYY represents the ID of the question for which the answer is
submitted.
To trigger the submission of an answer on a category page:
$BV.ui("qa", "submit_answer", {subjectType: "category", categoryId: "XXXXX", questionId: YYYYY});
where XXXXX represents the category ID and YYYYY represents the ID of the question for which the answer is
submitted.
URL formats
Use the following URL formats to trigger the submission of a question on a product or category page:
To trigger the submission of a question on a product page:
http://answers.example.com/bvstaging/answers/1234-en_us/product/XXXXX/askquestion.htm?OPTIONS
where XXXXX represents the product ID and OPTIONS represents the appropriate URL options.
To trigger the submission of a question on a category page:
http://answers.example.com/bvstaging/answers/1234-en_us/category/XXXXX/askquestion.htm?OPTIONS
where XXXXX represents the category ID and OPTIONS represents the appropriate URL options.
Similarly, you can use the following URL formats to trigger the submission of an answer on a product or category
page:
To trigger the submission of an answer on a product page:
http://answers.example.com/bvstaging/answers/1234-en_us/product/XXXXX/question/YYYYY/answerques
tion.htm?OPTIONS
Bazaarvoice Confidential
77
where XXXXX represents the category ID, YYYYY represents the ID of the question for which the answer is
submitted, and OPTIONS represents the appropriate URL options.
Ensure that /bvstaging is removed from the URLs in your production environment.
Related Links
Options for submission link parameters on page 79
URL formats
Use the following URL formats to trigger the submission of a campaign content on a product or category page:
To trigger the submission of campaign content on a product page:
http://stories.example.com/bvstaging/stories/1234-en_us/product/XXXXX/writestory.htm?OPTIONS
where XXXXX represents the product ID and OPTIONS represents the appropriate URL options.
To trigger the submission of a campaign content on a category page:
http://stories.example.com/bvstaging/stories/1234-en_us/category/XXXXX/writestory.htm?OPTIONS
where XXXXX represents the category ID and OPTIONS represents the appropriate URL options.
78
Bazaarvoice Confidential
Appendix
Ensure that /bvstaging is removed from the URLs in your production environment.
Related Links
Options for submission link parameters on page 79
By using a URL:
http://ugc.example.com/bvstaging/profiles/1234-en_us/editprofile.htm?OPTIONS
Ensure that /bvstaging is removed from the URLs in your production environment.
The user ID is not part of the API or URL due to the following assumptions:
Users typically edit their own profiles.
The user ID is passed to Bazaarvoice as part of the authentication process.
Description
Suggested Use
campaignid
String of up to 255 characters that is recorded with submissions To determine the degree of success of a
that use this URL.
particular URL, such as one used in an
email campaign.
return
submissionurl
URL to use for the submission container page; must contain the To change the URL of the submission
Bazaarvoice integration code that is specified in Implementing container page to a value other than the
the submission container page on page 28. Users are redirected one that Bazaarvoice has configured.
to this URL to view the actual submission form. The default value
is the value of the URL that is configured in the Bazaarvoice
configuration files.
Bazaarvoice Confidential
Always define.
79
Option
Description
Suggested Use
user
All values must be URL-encoded. The following URL provides an example submission link that uses the return and
campaignid parameter options.
http://reviews.example.com/bvstaging/1234-en_us/prod5678/writereview.htm?return=http%3A%2F%2Fexam
ple.com%2F&campaignid=PPE_EMAIL_OCT10
80
Bazaarvoice Confidential