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

# BuyGoods and ClickFlare Integration Guide

> Track BuyGoods offers in ClickFlare: pass the click ID in subid2, add one Postback Pixel on the Purchase event, and keep upsells apart with the order ID.

![BuyGoods and ClickFlare Integration](https://mintcdn.com/clickflare/VQTm_IbloDE7ntcf/images/integrations/covers/buygoods.png?fit=max\&auto=format\&n=VQTm_IbloDE7ntcf\&q=85\&s=71ed4fd0d1032b6659e9bb497df00be5)

BuyGoods is a US affiliate marketplace for health and nutra e-commerce: supplements and similar products sold through VSL funnels. As an affiliate, you pick an offer in the BuyGoods back office, get your affiliate link and earn a commission on each sale, including upsells.

To track BuyGoods offers in ClickFlare, two links have to carry the ClickFlare click ID in both directions:

* **The offer URL** sends the ClickFlare click ID to BuyGoods in `subid2`.
* **The postback URL** sends it back to ClickFlare with every sale, together with your commission and the order ID.

This guide covers the full setup, where to place the postback so sales don't fire twice, how upsells arrive, and how to check that it all works.

> [!TIP]
>
> Only need the two values? The [Click ID & postback macros](/docs/en/integrations/click-id-and-postback-macros.md?q=buygoods) page has them ready to copy with your tracking domain.

***

## How the data flows

```text theme={null}
Ad click
  → https://trk.yourdomain.com/cf/r/CAMPAIGN?...
     (ClickFlare records the click and generates the click ID)
  → [optional lander → CTA uses the ClickFlare click URL]
  → https://offer-domain.com/?aff_id=12345&subid2=CF_CLICK_ID
     (BuyGoods stores the ClickFlare click ID in subid2)
  → Visitor buys on the offer's order page
  → BuyGoods fires your postback pixel:
     https://trk.yourdomain.com/cf/cv?click_id=CF_CLICK_ID&payout=39.00&txid=BUYGOODS_ORDER_ID
     (ClickFlare matches the conversion to the original click)
```

The two links mirror each other:

| Link | Built from | BuyGoods side | ClickFlare side |
| - | - | - | - |
| **Offer URL** (in ClickFlare) | BuyGoods' parameter + ClickFlare's token | `subid2` | `{cf_click_id}` |
| **Postback URL** (in BuyGoods) | ClickFlare's parameter + BuyGoods' macro | `{SUBID2}`, `{COMMISSION_AMOUNT}`, `{ORDERID}` | `click_id`, `payout`, `txid` |

> [!NOTE]
>
> **Offer URL = their parameter + your token. Postback URL = your parameter + their macro.** BuyGoods writes the click ID into `subid2` on the way in and reads it back with `{SUBID2}` on the way out. The link parameter is **lowercase** and the macro is **uppercase**: both refer to the same slot.

***

## What you'll need

* An active ClickFlare account with your **own tracking domain** set up. Shared domains get flagged by networks and blocked by browsers. See [Tracking domains](/docs/en/settings/tracking-domains.md).
* A BuyGoods affiliate account, approved to promote the offer you want to run.

***

## What the BuyGoods template contains

ClickFlare has a **BuyGoods** affiliate network template. It fills in the BuyGoods macros ClickFlare needs.

![The BuyGoods template in ClickFlare: Click Id is \{SUBID2}, Payout is \{COMMISSION\_AMOUNT} and Transaction ID is \{ORDERID}](https://mintcdn.com/clickflare/VQTm_IbloDE7ntcf/images/integrations/buygoods/clickflare-buygoods-template-parameters.png?fit=max\&auto=format\&n=VQTm_IbloDE7ntcf\&q=85\&s=69e6e2ffb2dc37b0e423ce73646328b4)

| Field | BuyGoods macro (AN Token) | ClickFlare parameter | What it does |
| - | - | - | - |
| **Click Id** | `{SUBID2}` | `click_id` | Returns the ClickFlare click ID that the offer URL put in `subid2`. Pre-filled by the template. |
| **Payout** | `{COMMISSION_AMOUNT}` | `payout` | Your commission on the sale, for example `39.00`. Pre-filled by the template. |
| **Transaction ID** | `{ORDERID}` | `txid` | BuyGoods' unique order ID. Pre-filled by the template. See [why](#why-the-transaction-id-matters). |
| **Event Type** | leave empty | `ct` | The conversion type. Leave it empty, or see [Upsells](#upsells). |

> [!WARNING]
>
> If you created a BuyGoods affiliate network in ClickFlare before, check its **Payout**. Older versions of the template used `{COMMISSION}`, which BuyGoods doesn't recognize, so conversions arrived with no revenue. Change it to `{COMMISSION_AMOUNT}` in ClickFlare and in the postback URL in BuyGoods.

***

## Setup

Everything in ClickFlare is done from inside the campaign editor. Create the offer and the affiliate network inline as you go.

**1. Set up your own tracking domain**

Add a custom tracking domain before anything else, for example `trk.yourdomain.com`. The postback URL is built on this domain, so changing it later means updating the postback in BuyGoods too. See [Tracking domains](/docs/en/settings/tracking-domains.md).

**2. Report conversions by postback time**

Go to **Settings → General Settings** and set **Conversion registration time reporting** to **Postback Timestamp**.

BuyGoods reports a sale on the day it happened. With the default **Visit Timestamp**, ClickFlare reports it on the day of the original click, so a sale that comes in later lands on a different date in each platform. See [Conversion registration time](/docs/en/settings/conversion-registration-time-reporting.md).

> [!NOTE]
>
> This is an account-wide setting. It changes the date conversions are reported on for every campaign.

**3. Create the campaign**

Go to **Campaigns → New Campaign**, choose **Redirect tracking**, pick your traffic source and select your tracking domain. See [Creating a campaign](/docs/en/campaigns/creating-a-campaign-in-click-flare.md).

**4. Create the BuyGoods affiliate network**

While creating the offer for the campaign, create a new affiliate network in its **Affiliate Network** field. You can also create it first under **Affiliate Networks → + New**. Either way:

1. Search for **BuyGoods** and pick the template.
2. Keep the name "BuyGoods".
3. Check that **Click Id** is `{SUBID2}`, **Payout** is `{COMMISSION_AMOUNT}` and **Transaction ID** is `{ORDERID}`.
4. Leave **Event Type** empty.
5. Under **Conversion tracking**, select your own **Tracking Domain** and keep **S2S Postback URL** as the tracking method.
6. Set **Payout currency**. BuyGoods sends no currency macro and shows affiliate payouts in US dollars, so USD is the usual choice. If you're unsure, ask your affiliate manager.

ClickFlare builds the postback URL from these fields:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id={SUBID2}&payout={COMMISSION_AMOUNT}&txid={ORDERID}
```

![The Conversion tracking section of the BuyGoods network in ClickFlare, with the generated postback URL: click\_id=\{SUBID2}, payout=\{COMMISSION\_AMOUNT} and txid=\{ORDERID}](https://mintcdn.com/clickflare/VQTm_IbloDE7ntcf/images/integrations/buygoods/clickflare-buygoods-postback-url.png?fit=max\&auto=format\&n=VQTm_IbloDE7ntcf\&q=85\&s=4fb56019b0717f743c8b1a45d8ede464)

Copy the postback URL and save the network.

**5. Get your affiliate link from BuyGoods**

In the BuyGoods back office, open the **Campaigns** tab, find the offer and click **Promote** (or **Apply to promote** if the offer needs approval). Copy your affiliate link. Your links are also listed on the dashboard under **Your Affiliate Links**. The link looks like this:

```text theme={null}
https://offer-domain.com/?aff_id=12345
```

`aff_id` is your affiliate ID and is already filled in. Some offers use a path, for example `/b/report.php?aff_id=12345`. Either way, the link already has a `?`.

**6. Create the offer in ClickFlare**

In the offer form:

1. Name the offer.
2. Select the BuyGoods affiliate network you just created.
3. Paste the BuyGoods link into **Offer URL** and type `&subid2={cf_click_id}` at the end yourself:

```text theme={null}
https://offer-domain.com/?aff_id=12345&subid2={cf_click_id}
```

![The ClickFlare New Offer form with the BuyGoods affiliate network selected and subid2=\{cf\_click\_id} in the Offer URL](https://mintcdn.com/clickflare/VQTm_IbloDE7ntcf/images/integrations/buygoods/clickflare-buygoods-offer-url.png?fit=max\&auto=format\&n=VQTm_IbloDE7ntcf\&q=85\&s=c2496605e6db357186e510a19afc4537)

4. Leave **Append Click ID to Offer Url** off. ClickFlare builds that parameter from the template's macro, so it would add `SUBID2` in uppercase instead of the lowercase `subid2` BuyGoods expects.

> [!WARNING]
>
> Write `{cf_click_id}` with braces. Without them BuyGoods stores the literal text `cf_click_id`, the postback returns that text, and the conversion cannot be matched to a click.

Set the payout to **Auto** so ClickFlare uses the `payout` value from the postback.

**7. Add the Postback Pixel in BuyGoods**

BuyGoods has two places for a postback. Use **one** of them, never both:

* **For all your offers (recommended):** click your name or profile icon in the top right and open **Postback Pixels**.
* **For one product only:** on the dashboard, click the product name, open **Settings** and go to the **Postback pixels** tab.

Click **Add new** and set:

| Field | Value |
| - | - |
| **URL** | The ClickFlare postback URL you copied |
| **Event** | **Purchase** |
| **Status** | **Active** |

Save it.

> [!WARNING]
>
> If the same postback is set both in your profile and on a product, BuyGoods fires both and each sale is sent twice. Check the product's **Postback pixels** tab before you add a profile-level one, and remove any old entries.

The product **Settings** page also holds browser pixels for the lander, VSL and checkout pages. Those are not postbacks: for ClickFlare, use the postback pixel with the **Purchase** event.

**8. Add a lander (optional)**

If you send traffic through a lander before the offer, the lander's CTA must use the **ClickFlare click URL**, not the BuyGoods link. ClickFlare then adds the click ID when it redirects to the offer. See [Paths with landers and offers](/docs/en/campaigns/campaign-s-path-destination-to-landers-offers.md).

**9. Save the campaign and launch**

Save the campaign, copy the campaign URL from the **Tracking** tab and use it in your ads. Before you spend money on traffic, run the checks in [Verify the setup](#verify-the-setup).

***

## Why the transaction ID matters

By default ClickFlare keeps **one conversion per click ID**. If several postbacks arrive with the same click ID and no transaction ID, ClickFlare treats them as the same conversion, and you only see one of them (the last one received). The `txid` parameter tells ClickFlare that each postback is a separate conversion, so its value has to be **different on every conversion**.

`{ORDERID}` is BuyGoods' unique order ID, and the right choice for two reasons:

* **Upsells stay apart.** A front-end sale and its upsells arrive on the same click. Trackers use `{ORDERID}` to tell them apart, as each upsell is recorded as its own order, so ClickFlare counts each one. Check this on your first upsell (see [Verify the setup](#verify-the-setup)).
* **Retries don't double count.** BuyGoods expects a response from your postback URL. If it doesn't get one, it treats the call as failed and **retries for up to three days**. A retried postback carries the same order ID, so ClickFlare doesn't count it twice.

Don't use a random value or leave `txid` out. With a random value, every retry counts as a new sale. Without `txid`, the upsells overwrite the front-end sale.

***

## Upsells

BuyGoods offers often have upsells after the main order. The front-end sale and each upsell fire their own **Purchase** postback, each with its own `{COMMISSION_AMOUNT}` and order ID. A buyer who takes the main bundle and one upsell sends two postbacks, and ClickFlare records two conversions on the same click.

### Split front-end sales and upsells

BuyGoods' official macro list covers `{SUBID}` to `{SUBID5}`, `{ORDERID}`, `{PRODUCT_CODENAME}` and `{COMMISSION_AMOUNT}`. Tracker templates also use `{CONV_TYPE}`, which is `frontend` for the main sale and `upsell` for an upsell. It isn't in the official list, so test it on your account before you rely on it.

To report front-end sales and upsells as separate columns, set **Event Type** to `{CONV_TYPE}` in the ClickFlare affiliate network, or add `&ct={CONV_TYPE}` to the postback URL:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id={SUBID2}&payout={COMMISSION_AMOUNT}&txid={ORDERID}&ct={CONV_TYPE}
```

> [!WARNING]
>
> Create [custom conversions](/docs/en/settings/custom-conversions.md) with the parameters `frontend` and `upsell` first. The `ct` value must **exactly match** a custom conversion parameter, or ClickFlare records a regular conversion instead.

If you only want the detail in reports, pass it as an extra parameter instead, for example `&param1={CONV_TYPE}&param2={PRODUCT_CODENAME}`. See [Postback parameters](/docs/en/tracking/click-flare-parameters-in-postback-urls.md).

***

## Refunds and chargebacks

BuyGoods has no refund or chargeback event for affiliate postbacks. Refund and chargeback notifications exist on the vendor side, and affiliate postbacks fire only on purchases. A sale that is later refunded stays in ClickFlare.

Compare ClickFlare with your BuyGoods reports before payday, and adjust the conversions BuyGoods refunded.

***

## Verify the setup

**1. Click through the campaign**

Open the ClickFlare campaign URL (with a lander, also click the CTA). When the offer loads, check the address bar or your browser's network tab: the BuyGoods link should have `subid2=` followed by a real ClickFlare click ID, not the literal text `{cf_click_id}`.

**2. Generate a test sale**

The postback needs a real click ID, so it has to start from your ClickFlare click. After your click, complete an order, or ask your affiliate manager how to place a test order on the offer. The postback returns whatever was in `subid2` on that click.

**3. Check the conversion in ClickFlare**

The conversion should appear on the campaign with your commission as the payout. In **Logs → Event Logs**, check that it has a `txid` (the BuyGoods order ID). If you take an upsell, a second conversion should arrive with a different `txid`.

***

## Troubleshooting

> **Sales show in BuyGoods but not in ClickFlare**
>
> Work through these in order:
>
> * **The pixel isn't active or isn't on Purchase.** Check **Status** and **Event** on the postback pixel.
> * **subid2 is empty.** The offer URL is missing `subid2={cf_click_id}`, or the lander CTA links straight to BuyGoods instead of using the ClickFlare click URL. If the parameter is missing, `{SUBID2}` arrives empty.
> * **The sub numbers don't match.** The offer URL uses `subid` but the postback reads `{SUBID2}`, or the other way around.
> * **The parameter is uppercase.** **Append Click ID to Offer Url** adds `SUBID2=` in uppercase. Turn it off and type `&subid2={cf_click_id}` yourself.
> * **The pixel is on another product.** A product-level pixel only fires for that product. Use the profile-level **Postback Pixels** to cover all offers.
>
> See [Troubleshooting S2S postbacks](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md) for the general checks.

> **Each sale shows twice in ClickFlare**
>
> The postback is set both in your profile's **Postback Pixels** and on the product's **Postback pixels** tab, so BuyGoods sends each sale twice. Two identical URLs with `txid={ORDERID}` merge into one conversion, but an older pixel with a different `txid`, or none, counts again. Keep one pixel and remove the other.

> **The payout is 0**
>
> * The postback uses `{COMMISSION}`, which BuyGoods doesn't replace. Change it to `{COMMISSION_AMOUNT}` in the ClickFlare affiliate network and in BuyGoods.
> * Check that the offer's payout is set to **Auto** in ClickFlare.

> **ClickFlare receives a literal \{SUBID2} or cf\_click\_id**
>
> * A literal `{SUBID2}` means BuyGoods didn't replace the macro. BuyGoods macros are uppercase: check the spelling.
> * A literal `cf_click_id` means the offer URL in ClickFlare has the token without braces. It must be `{cf_click_id}`.

***

## FAQ

> **Why subid2 and not subid?**
>
> Both work, as long as the offer URL and the postback use the same slot. `subid2` is the ClickFlare template's default, and it leaves `subid` free for your own labels. BuyGoods reports break sales down by SubID, so a readable label in `subid` is more useful there than a click ID.

> **Can I pass more data to BuyGoods?**
>
> Yes. Use the other sub IDs in the offer URL, for example `&subid={campaign_id}&subid3={trackingField1}`. BuyGoods returns them in `{SUBID}` and `{SUBID3}`. Keep `subid2` for the click ID.

> **Can I track checkout starts?**
>
> Not with a postback. BuyGoods sends server-to-server postbacks only for purchases. Checkout and other funnel steps use browser pixels on the product **Settings** page.

> **Can I send the conversion back to my traffic source?**
>
> Yes. Once ClickFlare records the BuyGoods conversion, it can send it to the traffic source through the traffic source's postback or conversion API integration. Nothing changes on the BuyGoods side.

***

## Related

> **[Macro reference](/docs/en/integrations/click-id-and-postback-macros.md)**
>
> Every network's values

> **[Custom conversions](/docs/en/settings/custom-conversions.md)**
>
> Split front-end and upsells

> **[ClickBank](/docs/en/integrations/click-bank.md)**
>
> A similar marketplace


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.