Order Confirmation Attributes
Use the attributes listed in the table below to capture data from orders placed on your website, and to send data from orders to third-party reporting tools. For more information and a code sample, see Working with Google Analytics.
Capture data related to the order amount, shipping, and tax by adding attribute tags to your tracking script HTML on the Analytics subtab of the website record.
For best practice, enter all analytics information in one place at Commerce > Websites > Website List on the Analytics subtab. Note that the confirmation attribute is only used on the Thank You page, displayed after a shopper on your site submits an order.
The sample attribute tag below captures data from the items on the order:
<%=getCurrentAttribute('confirmation','orderitems')%>
Order component |
Attribute |
Notes |
---|---|---|
Order subtotal |
subtotal |
|
Tax calculated for complete order |
tax |
|
Order shipping amount |
shipping |
|
Grand total for the order |
total |
|
order number |
ordernumber |
|
Promotion code ID |
promotioncoderef |
Only supported on the order confirmation page. |
Partner ID |
partner |
|
Shipping method |
shipmethodref |
|
Promotion code name |
promocode |
|
Lead Source |
leadsource |
|
|
orderitems |
Returns data for each item in the order, including item name, quantity, and price. |
|
shiptocity |
Returns the city where the order was shipped. |
|
shiptostate |
Returns the state (or province?) where the order was shipped. |
|
shiptocountry |
Returns the country where the order was shipped. |