Create an Order Confirmation mbox - at.js

The Order Confirmation mbox records details about orders on your site and allows reporting based on revenue and orders. The Order Confirmation mbox can also drive recommendation algorithms, such as "People who bought product x also bought product y."

Note: If users make purchases on your website, we recommend implementing an Order Confirmation mbox even if you use Analytics for Target (A4T) for your reporting.
Note: If you are migrating to at.js from mbox.js, your existing Order Confirmation mbox might work as is. If this is the case, you don't need to use the trackEvent() technique explained below.
  1. In your order details page, insert the mbox script following the model below.
  2. Replace the WORDS IN CAPITAL LETTERS with either dynamic or static values from your catalog.
    Note: Use comma delimiting to separate multiple product IDs.

    Tip: You can also pass order information in any mbox (it does not need to be named orderConfirmPage). You can also pass order information in multiple mboxes within the same campaign.

    <script type="text/javascript">
    adobe.target.trackEvent({
        "mbox": "orderConfirmPage",
        "params":{ 
            "orderId": "ORDER ID FROM YOUR ORDER PAGE", 
            "orderTotal": "ORDER TOTAL FROM YOUR ORDER PAGE", 
            "productPurchasedId": "PRODUCT ID FROM YOUR ORDER PAGE, PRODUCT ID2, PRODUCT ID3" 
        }
    });
    </script> 

The Order Confirmation mbox uses the following parameters:

Parameter Description

orderId

Unique value to identify an order for conversion counting.

The orderId must be unique. Duplicate orders are ignored in reports.

orderTotal

Monetary value of the purchase.

Do not pass the currency symbol. Use a decimal point (not a comma) to indicate decimal values.

productPurchasedId (Optional)

Comma-separated list of product IDs purchased in the order.

These product IDs display in the audit report to support additional reporting analysis.