> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/orders/orders/order-tracking/track-sales-with-custom-parameters.md).

# Track sales with custom parameters

## Overview

Define multiple URL parameters to track your sales through the 2Checkout system. The custom URL parameters can be used for tracking at both product and order level.

## Availability

All 2Checkout accounts.

## Create custom parameters

Follow the steps below to create custom parameters to add to products and buy links.

1. Log into your 2Checkout [Merchant Control Panel](https://secure.2checkout.com/cpanel) account.
2. Go to *Setup >* [*Ordering options*](https://secure.2checkout.com/cpanel/order_settings.php)*.*
3. Scroll down to Additional order fields and click on [**Click here to create and manage**](https://secure.2checkout.com/cpanel/additional_fields.php) **additional fields and collect extra information from shoppers at checkout or track orders**.<br>

   <div data-with-frame="true"><figure><img src="https://3937829065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkaSTDCaEr6u6m22Kgru%2Fuploads%2FcfAII1QGkVyHLzxTKNVv%2Fimage.png?alt=media&amp;token=b624d736-d048-4d8d-ac86-346f830590c7" alt=""><figcaption></figcaption></figure></div>
4. Use the **Add new field** section to define each new field.
   * Enter the **Field identifier**. This reference is used to create the URL parameter that you can use in buy links. Use unique identifiers for all your fields. **Note**: This field accepts only alpha-numeric characters. If you leave this field empty, 2Checkout generates a random value as an identifier.
   * Enter the **Field text** (the name of the field).
   * Set the **Field type** to **Hidden**. Otherwise, otherwise the field will be a Textbox, Checkbox, or Listbox, all of which are visible in the shopping cart. **Hidden** fields help you create custom URL tracking parameters and they are invisible to shoppers.
   * Use the **Apply to** drop-down to choose whether the field should apply at the product or order level.&#x20;
   * Use the **Validation rule** field to specify the regular expression to validate the field values.
   * Click **Create field** to save the new field.<br>

     <div data-with-frame="true"><figure><img src="https://3937829065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkaSTDCaEr6u6m22Kgru%2Fuploads%2Fty3pohxxuvSkQuCHWQN0%2Fimage.png?alt=media&amp;token=e337571f-e335-4caa-a391-e8e333f8bd61" alt=""><figcaption></figcaption></figure></div>

## Assign custom parameters to products

Follow the steps in the **Create custom parameters** section to create a new **Hidden** parameter and apply it at the **Product** level.

Next, follow the steps below to assign the parameter to a product.

1. Once logged in to your [Merchant Control Panel](https://secure.2checkout.com/cpanel), go to **Setup** and click on [Products](https://secure.2checkout.com/cpanel/products.php).
2. Click **Edit** on the product you want to assign the parameter to.<br>

   <div data-with-frame="true"><figure><img src="https://3937829065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkaSTDCaEr6u6m22Kgru%2Fuploads%2FfDlNkJGOG7TPVi83A4qI%2Fimage.png?alt=media&amp;token=722ec3f5-ee59-405e-8096-782a354dd066" alt=""><figcaption></figcaption></figure></div>
3. Go to the **Information** tab and scroll to the bottom of the screen. You'll find the previously defined parameter in the **Order additional fields** section. All new parameters are disabled by default.
4. Check the **Enabled** option on the **Order page** column corresponding to the parameter you want to use. Click **Save**.<br>

   <div data-with-frame="true"><figure><img src="https://3937829065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkaSTDCaEr6u6m22Kgru%2Fuploads%2FuJcATcBDIbnaaxm2uwgG%2Fimage.png?alt=media&amp;token=a523068a-0f5e-42b5-8bc2-d34b7fb27bfd" alt=""><figcaption></figcaption></figure></div>

## Assign custom parameters to orders

Follow the steps in the **Create custom parameters** section to create a new **Hidden** parameter and apply it at the **Order** level.

Next, follow the steps below to assign the parameter to an order.

1. Log into your 2Checkout [Merchant Control Panel](https://secure.2checkout.com/cpanel) account.
2. Go to *Setup →* [*Ordering options*](https://secure.2checkout.com/cpanel/order_settings.php)*.*
3. Scroll down to **Additional order fields**.
4. Check the checkbox next to the parameter you want to use.<br>

   <div data-with-frame="true"><figure><img src="https://3937829065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMkaSTDCaEr6u6m22Kgru%2Fuploads%2FMUq5JCNQwYnjHtmxMd5N%2Fimage.png?alt=media&amp;token=50cf5d8f-4d79-4385-95de-680f2eaa2d63" alt=""><figcaption></figcaption></figure></div>
5. Click **Save settings** at the bottom of the page.

## Build buy-links using custom parameters

### Build buy-links with per-product parameters

Let's assume you created **customparameter** for Product A with the ID 1234567, and the 2Checkout system created the **ADDITIONAL\_customparameter\[1234567]** URL parameter.

To track sales of this product using **customparameter**, add **ADDITIONAL\_customparameter\[1234567]** to the buy link as such:

```
https://secure.2checkout.com/order/checkout.php?PRODS=1234567&ADDITIONAL_customparameter[1234567]=CustomTrackingSource1
```

You can assign the desired values to custom URL parameters to best serve you in the sales tracking process.

### Build buy-links with per-order parameters

Let's assume you created **customparameter** for orders, and the 2Checkout system created the **ADDITIONAL\_customparameter** URL parameter.

To track orders using **customparameter**, add **ADDITIONAL\_customparameter** to the buy link as such:

```
https://secure.2checkout.com/order/checkout.php?PRODS=1234567&ADDITIONAL_customparameter=CustomTrackingSourceForOrders
```

You can assign the desired values to custom URL parameters to best serve you in the sales tracking process.

Related documentation

* [Products and subscriptions listing query parameters](https://verifone.cloud/docs/2checkout/Documentation/myAccount/Products-and-subscriptions-listing-query-parameters)
* [Subscriber management and self-service](https://verifone.cloud/docs/2checkout/Documentation/Subscription-Billing/03Subscriber-management-and-self-service)
* [Contracts](https://verifone.cloud/docs/2checkout/Documentation/Subscription-Billing/01Subscription-Billing-Set-up/03Contracts)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/orders/orders/order-tracking/track-sales-with-custom-parameters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
