Order Confirmation Attributes
Use the attributes listed in the table below to capture data from orders placed on your website and send it to third-party reporting tools. For more information and a code sample, see Working with Google Analytics.
Capture order amount, shipping, and tax data by adding attribute tags to your tracking script HTML on the Analytics subtab of the website record.
For best results, enter all your analytics information in one place at Commerce > Websites > Website List on the Analytics subtab. The confirmation attribute is only used on the Thank You page, which shows up after a shopper submits an order on your site.
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. |