---
schema_version: "1"
id: f641ffdacecaa0fd945432610f13a1e2c3f68fc646e5881cb4021ca85299e1e6
title: Track Purchase Details
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_ctc_track_conversion.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_conversion.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f2f9ed94cbdb2384ef0f2dcff9806fe723b0399ac2b41d490db35ef356eb9c75
description: Configure Collect Tracking Code to store details about a contact’s purchases from your website.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Track Purchase Details

Configure Collect Tracking Code to store details about a contact’s purchases from your website.

1. Copy and customize the Track Conversion script to include the attributes to track.
    
    ```
    <script type="text/javascript">
        _etmc.push(["setOrgId", "MID"]);
        _etmc.push(["trackConversion", {
            "cart": [
                {
                    "item": "INSERT_ITEM",
                    "quantity": "INSERT_QUANTITY",
                    "price": "INSERT_PRICE",
                    "unique_id": "INSERT_UNIQUE_ID"
                },
                {
                    "item": "INSERT_ITEM",
                    "quantity": "INSERT_QUANTITY",
                    "price": "INSERT_PRICE",
                    "unique_id": "INSERT_UNIQUE_ID"
                }
            ],
            // OPTIONAL PARAMETERS
            "order_number": "INSERT_ORDER_NUMBER",
            "discount": "INSERT_DISCOUNT",
            "shipping": "INSERT_SHIPPING",
            "details": {
                "AttributeName": "Value"
            }
            // END OPTIONAL PARAMETERS       
        }]);
    </script>
    ```
2. Paste the modified script in the header code on your detail pages. This method requires the same structure as the Track Cart script.
3. Optionally, add order level information, such as order number, shipping charges, discounts applied, and custom details.

#### See Also

- [Install Collect Tracking Code](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_install_collect_code.htm&release=264.0.0&type=5 "Learn how to configure your site to use Collect Tracking Code.")
- [Track Category Viewed](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_category_view.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store category data for the product a contact views on your website.")
- [Track In-Site Search](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_in_site_search.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store data about a contact’s search on your website.")
- [Track Items in Cart](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_cart.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to track items that are added or removed from a contact’s cart.")
- [Track Page View](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_page_view.htm&release=264.0.0&type=5 "The trackPageView call is the most common call and can capture three types of information: product or content views, categories views, or search views.")
- [Track User Rating](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_rating.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store contact ratings for items on your website.")