Transaction and Conversion events

Transaction events (e-Commerce sites)

The transaction event tag captures purchase data and feeds the Conversion Impact Report e-Commerce. We recommend adding this event tag to a Thank you or Payment confirmation page.

Technical Implementation

Add the transaction event and required parameters below the BV loader code, as the following code example shows.

JavaScript
window.bvCallback = function (BV) {
  BV.pixel.trackTransaction({
    "orderId": "order-000001",
    "total": "168.08",
    "currency": "USD",
    "tax": "11.44",
    "shipping": "10.00",
    "items": [
      {
        "name": "Product Name",
        "price": "140.00",
        "quantity": "1",
        "productId": "156278",
        "category": "Category Name"
      }
    ]
  });
};
Note: Parameter names are case sensitive and must be specified as shown.

Order parameters (required)

Note: No currency parameter is required. Revenue for non-USD currencies is converted to USD on a nightly basis, using each day’s closing foreign exchange conversion rate. If no currency value is provided in the transaction event, the currency defaults to USD and no currency conversion occurs.

To ensure accurate reporting, map your checkout data to the following fields:

Parameter Description Example value
orderId

Unique ID of an order generated by a site.

Impact:

  • Required to distinguish unique counts of orders.
  • An important factor in measuring ROI.
55555
total

Total cost of the product order with discounts and coupons applied but excluding tax and shipping. Specify the value for total in English format using two decimal places. Do not include a currency symbol, such as $ for USD. Do not use a comma, such as , to display a thousands separator when the total order is over 1000.

Impact:

  • Affects revenue in the CIR.
  • An important factor in measuring ROI.
1178.07
items Array of the individual items in the transaction. See the following sections for required and optional array parameters.

Item parameters (required)

The following item parameters are important factors in measuring ROI.

Parameter Description Example
price

Individual price of the item, not price x quantity.

Specify the value for price in the English format using two decimal places. Do not include a currency symbol, such as $ for USD.

12.95
quantity Number of items purchased. 3
productId

Must match the product <ExternalId> in your Bazaarvoice product catalog. Do not set this to standard SKU unless you use SKU to identify products in your Bazaarvoice catalog.

908736

Order and item parameters (optional)

Note: If you don't need an optional parameter, don't include it in the event. For example, if the tax parameter has no data, don't add "tax" : "" (an empty string). Leave out the parameter.
Parameter Description Example
name

Name of the item.

Serena Boots
category

(Recommended) Item parameter that captures the product category used on the website.

Impact: Enables you to measure ROI by category.

Mens casual boots
shipping

(Recommended) Order parameter that captures the cost of shipping the order. Specify the value for shipping in the English format using two decimal places. Do not include a currency symbol, such as $ for USD.

Impact: Allows Bazaarvoice to validate that your total parameter correctly excludes tax and shipping. This ensures your revenue and ROI reporting remain strictly tied to product value and are not artificially inflated.

10.00
shippingDate

Used instead of the transaction date to determine when Bazaarvoice sends the review requests. The date must be in the following format: YYYY-MM-DD.

If a first review request delay is configured, that delay is added to the date specified here. For example, if you specify "shippingDate" : "2016-12-21" and the review request delay is set to 10 days, the review request is sent on Dec 31, 2016 (2016-12-31).

You can use shippingDate or shippingDelay, but do not use both.

2016-12-21
tax

(Recommended) Order parameter that captures the amount of tax applied to the order. Specify the value for tax in the English format using two decimal places. Do not include a currency symbol, such as $ for USD.

Impact: Allows Bazaarvoice to validate that your total parameter correctly excludes tax and shipping. This ensures your revenue and ROI reporting remain strictly tied to product value and are not artificially inflated.

11.44
discount

(Recommended) Amount discounted from the entire order or for each item. Specify the value for discount in the English format using two decimal places. Do not include a currency symbol, such as $ for USD. This value must be a positive number. Apply this parameter to the entire order or to individual items to capture respective discounts.

Impact: Allows Bazaarvoice to validate that your total parameter correctly excludes tax and shipping. This ensures your revenue and ROI reporting remain strictly tied to product value and are not artificially inflated.

5.00
city

Order parameter that captures the end user specifying the order’s city.

Detroit
state

Order parameter that captures the end user specifying the order’s state.

Utah
country

Order parameter that captures the end user specifying the order’s country.

CA
deploymentZone If you have multiple deployment zones, use this order parameter to specify the ID for the deployment zone where your implementation is deployed. This parameter ensures that Bazaarvoice uses the implementation's email templates for sending review requests. Before referencing the deployment zone in the interaction feed, make sure the implementation with the configured email templates is published to that specific deployment zone. If you don't provide this parameter, the deployment zone specified by environment in the BV loader's path will be used. secondary_site
incentivizedReview

(Recommended) Item parameter that captures whether the review is incentivized. Just specify "True" or "False" to indicate if any incentive was given.

True
Note: If you’ve set up BV Pixel to send review requests, you’ll need to add personally identifiable information (PII) parameters to a transaction event on your product purchase page.

Conversion events (non-Commerce sites)

The conversion event tags allow you to track high-value, non-transactional actions on your site. These events capture non-transactional customer interactions (or behavior) on pages that display Where to Buy or AddToCart links.

Note
Note: Data captured by the conversion event cannot be used to send review requests. To send review requests, use the transaction event.

Technical Implementation

Add the conversion event and its parameters to the page below the BV loader, as shown in the example code.

JavaScript
<!-- load BV loader -->
<script async type="text/javascript" src="https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js"></script>

<!--load Conversion event and parameters-->
<script>
window.bvCallback = function (BV) {
BV.pixel.trackConversion({
 "type" : "value",
 "label" : "value",
 "value" : "value"
});
};
</script>
Note
Note: Parameter names are case sensitive and must be specified as shown.

Required parameters

The conversion event has only one required parameter - type. It’s used to:

  • Describe the type of conversion taking place. For example, a consumer signing up for a coupon, downloading trial software, or signing up for a newsletter.
  • Map directly to each goal that is measured in the non-eCommerce CIR.
Note
Note: Bazaarvoice can support any value for the type parameter, but we recommend the values in the following table for specific conversion types.

Enables the consumer to make a purchase now. Use the permutation value if it matches your needs better.

Parameter Type Description Permutations
type StoreLocator

Used to locate a store or to find where to purchase products offline.

Use the permutation value if it matches your needs better.

DealerLocator, FindStore
WhereToBuy

Where to buy products online or in-store.

BuyNow BuyOnline, ClickToBuy
Compare

Allows the consumer to compare two or more products.

ProductDetail

Provides additional product details.

AddToCart Adds product to a cart.
Quote Enables a consumer to request a price quote.

Optional parameters

Parameter Description Example
Value

Value attributed to the conversion. This value does not appear in the non-Commerce CIR.

55781
Label Descriptive label to apply to the conversion. This value does not appear in the non-Commerce CIR. ClickToBuy
Provide feedback button