> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackplay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# BuyGoods

> Connect BuyGoods so every sale is credited back to the video that made it.

TrackPlay tags every BuyGoods link on your page with the viewer's session. BuyGoods posts
the sale back. The two get joined. You find out which video, and which second, made
the money.

## Connect it

<Snippet file="connect-integration.mdx" />

## Tracking parameters

Pick one. It carries the viewer's session into BuyGoods and comes back on the postback.

| Parameter |             |
| --------- | ----------- |
| `subid_1` | Sub ID 1    |
| `subid_2` | Sub ID 2    |
| `subid_3` | Sub ID 3    |
| `vid1`    | Vendor ID 1 |
| `vid2`    | Vendor ID 2 |
| `vid3`    | Vendor ID 3 |

<Warning>
  Choose a parameter nothing else is using. TrackPlay **overwrites** the parameter you
  pick on every BuyGoods URL. If an affiliate network is already writing to `subid_1`,
  one of you loses.
</Warning>

## Set up the postback

Copy the URL from the **Postback Setup** window, then in your [BuyGoods admin
panel](https://admin.buygoods.com/#products-settings) go to **Product Settings** and paste
it into all three fields:

* **New Order URL**
* **Order Refund URL**
* **Order Chargeback URL**

Then trigger a test order. The Postback Setup window is watching for it live, and the
status flips from **Not configured** to **Active** on its own.

<Note>
  The integration deliberately stays **Not configured** until a real test conversion
  arrives. That way you find out the URL is wrong now, rather than after a launch when you
  are missing a day of sales.
</Note>

<Warning>
  Your postback URL is a secret. Anyone who has it can post fake conversions into your
  workspace. Give it to BuyGoods and nobody else.
</Warning>

## What TrackPlay does to your links

Every link and form on the page pointing at `buygoods.com` gets the parameter added
automatically. You never edit a buy button.

```
https://buygoods.com/checkout?product=123
→ https://buygoods.com/checkout?product=123&subid_1=<session>
```

## When it does not work

<AccordionGroup>
  <Accordion title="Status is stuck on 'Not configured'">
    No test conversion has arrived. Check the postback URL is pasted into **all three**
    Product Settings fields, then push a real test sale through: the status only moves
    when BuyGoods actually posts back.
  </Accordion>

  <Accordion title="Sales arrive, but no video is attached">
    The link was not tagged. Confirm the buy button really points at `buygoods.com`. A
    redirect or a link shortener in between will strip the query string and the session
    with it.
  </Accordion>

  <Accordion title="Links are not being modified at all">
    The player script has to be on the same page as the link. If your buy button lives on
    a different page, carry the session yourself and post the sale through the
    [Conversions API](/api-reference/conversions).
  </Accordion>
</AccordionGroup>
