> For the complete documentation index, see [llms.txt](https://docs.humblytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humblytics.com/how-to-track-purchase-events/foxy/custom-self-hosted-how-to-track-foxycart-purchases.md).

# Custom/Self-Hosted – How to Track Foxy Purchases

Connect Foxy in Humblytics, add one webhook in Foxy, and your transactions start flowing into Attribution.

## Step 1: Connect Foxy in Humblytics

1. Go to **Connect → Connectors**.
2. Under **Revenue**, click **Connect** next to **Foxy**.
3. Enter your **Foxy Store URL**.
4. Enter an **Encryption Key**. This is a password you create, and you'll paste the same value into Foxy. Save a copy somewhere safe.
5. Copy the **Webhook URL** Humblytics shows you.
6. Click **Save Changes**, and keep this tab open.

<mark style="background-color:pink;">ADD GIF HERE</mark>

## Step 2: Add the webhook in Foxy

1. Log in to your Foxy admin panel.
2. Go to **Integrations → Webhooks** and enable **JSON Webhook**.
3. Add a new webhook and paste the **Webhook URL** from Humblytics.
4. Paste the same **Encryption Key** you entered in Humblytics.
5. Select **transaction** events.
6. In **API filter**, enter:

   ```
   zoom=items,customer,custom_fields,subscription
   ```
7. Save.

The same steps appear under **Setup Instructions** in the Foxy connector in Humblytics.

## Step 3: Test it

1. Back in Humblytics, click **Test Connection**.
2. Make a test purchase on your live site in a private window.
3. Check **Observe → Attribution → Recent Attributed Transactions**. The order should appear within about a minute.

## Use Foxy sales in funnels and tests

* **A/B tests:** choose **Revenue** as the goal. See [How to set up a split test](/split-testing-overview/how-to-setup-a-split-test.md).
* **Campaigns:** add [UTM tags](/campaign-tracking-with-utm-links.md) to your ad and email links to see which ones drive sales.

## Troubleshooting

* **Nothing arrives:** the encryption key in Foxy must match the one in Humblytics exactly, and **transaction** events must be selected.
* **Orders arrive but aren't attributed:** the buyer's visit must start on a page that loads the Humblytics script.
* **Still stuck?** Email **<support@humblytics.com>**.
