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" } ] }); }; |
Order parameters (required)
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:
|
55555 |
total
|
Total cost of the product order with discounts and coupons applied but excluding tax and shipping. Specify the value for Impact:
|
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
Specify the value for |
12.95 |
quantity
|
Number of items purchased. | 3 |
productId
|
Must match the product |
908736 |
Order and item parameters (optional)
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
Impact: Allows Bazaarvoice to validate that your |
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 |
2016-12-21 |
tax
|
(Recommended) Order parameter that captures the amount of tax applied to the order. Specify the value for
Impact: Allows Bazaarvoice to validate that your |
11.44 |
discount
|
(Recommended) Amount discounted from the entire order or for each item. Specify the value for
Impact: Allows Bazaarvoice to validate that your |
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 |
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.
- Conversion events accept three high-level parameters to describe the type of conversion taking place.
- The conversion event feeds the Conversion Impact Report non-Commerce.
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> |
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.
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 |