How do I accurately track revenue for my commerce site in Webtrends?


Webtrends Analytics 9.x
Webtrends Analytics 8.x


How do I accurately track revenue for my commerce site in Webtrends?


The minimum requirement for tracking revenue in Webtrends is to pass WT.tx_s on the hit for which you wish to record revenue. While this will provide some preliminary reporting, the process can be improved.

One of the potential issues that can be associated with only passing WT.tx_s is duplicate orders. For instance, if a user refreshes a page that contains WT.tx_s an order will be logged for each refresh. This will cause an increase in the revenue being reported. The same behavior can occur if a user saves the page WT.tx_s is on and opens it at a later date or if they bookmark the page and come back to it at a later time.

The accuracy of the revenue being reported is increased by passing the parameters below. The more of these parameters that are present, the better your accuracy is. All of these parameters work in concert to remove duplicate entries in the log files that can occur because of the above scenarios.

WT.pn_sku – Identifies the SKU of the product. Use semicolons to pass multiple SKUs for the order.

WT.tx_u – Defines the quantity of items purchased. If the order contains multiple products, pass a semicolon-delimited list of units.

WT.tx_s – Defines the total cost for each WT.pn_sku or individual item value. If the order contains multiple SKUs, pass a semicolon-delimited list of values for this parameter. However, do not pass a dollar sign ($) or comma(,) in the subtotal variable.

WT.tx_e – This parameter identifies the type of transaction. It is used as a qualifier in measure definitions, along with the WT.tx_u to determine which product to count for a measure. To track Product Views, Product Cart Adds, and Product Cart Removes, this parameter takes the value p (purchase), v (view), a (add), or r (remove) respectively. The Product Views measure, for example, is based on WT.tx_u and uses WT.tx_e=v as a qualifier.

WT.tx_i – The invoice number. This parameter identifies the invoice number for the purchase. The visitor history scripts use this value to protect against a visitor refreshing the page after a purchase is made. If Webtrends sees a hit with an invoice number then that hit is compared against the last three invoices. If it does not match the invoice then Webtrends considers it a new purchase.

WT.tx_id – The format is mm/dd/yy. A 4-digit year is also allowed: mm/dd/yyyy. The purchase invoice date. If the date of purchase is three days older than the date of the visit, then no purchase was made. If the purchase was less than three days, the WT.tx_i parameter is used to determine if the hit is a valid purchase. This parameter is used to prevent erroneous purchases. For example, a visitor makes a purchase. The purchase is accounted with an invoice date. The user saves a bookmark to the page. Five days later, the visitor goes to the bookmarked page. This causes another hit to be sent to Webtrends. However, the WT.tx_id parameter still contains the original purchase date. Webtrends sees that the date of the hit is several days after the date found in the WT.tx_id parameter and determines that this is not an actual purchase.

WT.tx_it – The format is hh:mm:ss where hh is in a 24-hour format (00 = midnight, 23 = 11pm). This parameter is the time of the invoice and helps determine when an invoiced purchase was made. This value is used along with WT.tx_id and WT.tx_i to determine if the purchase was a valid purchase or if this was a user refreshing the Web page after a purchase or returning to the page to check status. This parameter is used to prevent erroneous purchases. If you do not have this parameter in the proper format, the order could be seen as having occurred too far in the past and the order will not be counted.

An example of a URL passing all of these parameters is listed below.


SKU 5461 would have 5 units purchased for a total of $5.00.
SKU 6515 would have 1 unit purchases for $1.00.
SKU 5466 would have 3 units purchased for a total of $3.00.

The revenue associated with this order would be $9.00 for invoice number 656156 and would have been placed on April 1st 2024 at 3:51:36 PM. If this page was refreshed or viewed again it would not count an order because the date and time have already passed. This will show as one order in the per product sku where product skus are reported (in this case three orders), and one order for the campaign if a campaign is associated with the order.

Please note parameters that accept multiple values should not use the ; separator for single values.