# ClickBank New Integration

> Set up the ClickBank integration with AnyTrack to track affiliate conversions, order page impressions, and rebills. Learn how the new extclid tracking parameter works, configure the Postback URL, and send conversion data to your ad platform Conversion APIs in real time.

As of June 4, 2024, ClickBank released new affiliate tracking parameters to supplement the existing tracking ID (`TID`) functionality for affiliate tracking links. These updates give affiliates better tracking, reporting, and automatic integrations with AnyTrack.

> ✅ **Success**
>
> AnyTrack is already integrated with the new affiliate tracking parameters.

> 📘 **Already integrated?**
>
> If your ClickBank account is already integrated with the new ClickBank tracking parameters, you just have to update the ISN version to Version 8.0 to enable your AnyTrack integration:
>
> 1. ClickBank links are automatically tagged with the new `extclid` tracking parameter.
> 2. The postback URL for both the Order Page Impression and Purchase events already supports the new parameters.
> 3. What you need to do is update the ISN version to version 8.0 to receive the new affiliate tracking parameters.
>
> <Image alt="Upgrade to ClickBank new affiliate tracking parameters" align="center" border={true} src={readmeAsset1} caption={"How to upgrade your ClickBank integration to Version 8.0 and take advantage of the new affiliate tracking parameters."} />

## The New ClickBank Integration

With AnyTrack, you can send accurate conversion data from your ClickBank account to your ad platform Conversion APIs (Google Ads, [Facebook Ads](/docs/facebook-ads), TikTok Ads, and more) in real time. This allows you to optimize your ad campaigns with rich conversion data and track complete customer journeys. AnyTrack also enables affiliate marketers to build custom audiences across all ad platforms, with granular customer journey insights, including product-level data and abandoned carts.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an AnyTrack account with a paid subscription", done: true },
    { label: "You have an active ClickBank affiliate account", done: true },
    { label: "The AnyTrack Tracking Tag is installed on your website", done: true },
  ]}
/>

### How the ClickBank AnyTrack Integration Works

<Image align="center" className="border" border={true} src={readmeAsset2} />

1. **Traffic**: When visitors land on your website, AnyTrack collects traffic source data and First Party data.
2. **Engagements**: When visitors click on your ClickBank affiliate links, AnyTrack does a few things:
   1. Collects granular data tied to the `OutboundClick`.
   2. Triggers Event Tracking API requests to your Tracking Tags and analytics.
3. **Customer Checkout**: When the visitor lands on the Order Page, AnyTrack tracks the Order Page Impression and triggers an `InitiateCheckout` event. See the [conversion payload example](#clickbank-conversion-payload-example) below.
4. **Conversions**: When your visitor completes the checkout, AnyTrack receives the conversion data through the [ClickBank Postback URL](#the-clickbank-postback-url).
5. **Attribution**: AnyTrack processes the conversion data and reports it across the AnyTrack Dashboard.
6. **Conversion API**: AnyTrack then sends your conversions to your ad platform Conversion APIs so you can feed your ad platform machine learning and automatic optimization with 100% of your conversion data.

<Image align="center" className="border" width="100%" border={true} src={readmeAsset3} />

### Technical Details

> 📘 **Note**
>
> These technical details are for reference only as they are automatically set by the AnyTrack Tracking Tag.

| Reference         | Value          | Information                                                                                 |
| ----------------- | :------------- | :------------------------------------------------------------------------------------------ |
| Tracking Group    | `ClickBank`    | The Tracking Group reference can be used to manually activate <Glossary>AutoTag</Glossary>. |
| Subid Parameter   | `extclid`      | The Subid Parameter used to pass the AnyTrack `click_id`.                                   |
| Tracking Method   | `Postback URL` | The conversion is sent from the ClickBank servers to AnyTrack.                              |
| Hop Link          | ✅              | `https://key.hop.ClickBank.net?extclid=--CLICK-ID--`                                        |
| Direct Offer Link | ✅              | `https://offerurl.foo/?shield=key&extclid=--CLICK-ID--`                                     |

### Standard Conversion Event Mapping

AnyTrack enables you to track all Event Types from ClickBank and map these events to either standard events or custom events.

For example, if you promote products that have recurring sales, you can map the initial sales to the standard `Purchase` event, and map the `REBILL` conversions to a custom Conversion name.

> ⚠️ **Warning**
>
> When you update the ClickBank conversion mapping, you must map the custom Events to your ad platform Conversion Events. Learn more about [Event Mapping](/docs/event-mapping).

| ClickBank Events   | AnyTrack Events    | Meta Conversions Mapping (example) | Details                                                          | Source               |
| :------------------ | :----------------- | :--------------------------------- | :--------------------------------------------------------------- | :------------------- |
| `Link Click`        | `OutboundClick`    | `ViewContent`                      | When a visitor clicks on a ClickBank hop link.                   | AnyTrack Tracking Tag |
| `Order Form`        | `InitiateCheckout` | `InitiateCheckout`                 | When a user loads the ClickBank order page.                      | Postback URL          |
| `SALE`              | `Purchase`         | `Purchase`                         | When a user generates a sale for a standard product.             | Postback URL          |
| `REBILL`            | `Purchase`         | `Purchase`                         | When a user generates a sale for a product with recurring sales. | Postback URL          |

### The ClickBank Postback URL

Upon adding ClickBank to your AnyTrack account, you will get your ClickBank postback URL. This postback URL will allow you to get your conversion data from the ClickBank servers to the AnyTrack server.

```http ClickBank Postback URL
https://t1.anytrack.io/xxxxx/collect/ClickBank
```

> ❗ **Important**
>
> The ClickBank integration requires the AnyTrack Tracking Tag in the `head` section of your website or landing pages. Learn how to [install the AnyTrack Tracking Tag](/docs/install-anytrack-tag) on your website.

## Setup Guide

### Step #1: Add ClickBank to your AnyTrack Account

1. Go to the **[Integration Catalog](https://dashboard.anytrack.io/catalog/)**, search for ClickBank.

![](./b8d8a61366876bb7d6d66219c6086b4d6fa4786829b71596ade9d35a10f51c88-image-9ad1c2d220.png)

2. Now click on the [ClickBank card](https://dashboard.anytrack.io/catalog/ClickBank) and then click on Install.

![](./afef6c7063893654322ac902b14a6147279453ded55b2da858c1e84fc8546d80-image-e03b8756b4.png)

### Step #2: Connect your ClickBank account

<Embed url="https://www.youtube.com/watch?v=vOnurTA12oM" title="How to Integrate ClickBank With AnyTrack" favicon="https://www.google.com/favicon.ico" image="https://i.ytimg.com/vi/vOnurTA12oM/hqdefault.jpg" provider="youtube.com" href="https://www.youtube.com/watch?v=vOnurTA12oM" typeOfEmbed="youtube" html="%3Ciframe%20class%3D%22embedly-embed%22%20src%3D%22%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FvOnurTA12oM%253Ffeature%253Doembed%26display_name%3DYouTube%26url%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DvOnurTA12oM%26image%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252FvOnurTA12oM%252Fhqdefault.jpg%26key%3D7788cb384c9f4d5dbbdbeffd9fe4b92f%26type%3Dtext%252Fhtml%26schema%3Dyoutube%22%20width%3D%22854%22%20height%3D%22480%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%3B%20encrypted-media%3B%20picture-in-picture%3B%22%20allowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E" />

### Step #3: Sales and Rebill Tracking

1. Copy the Postback URL from your AnyTrack account.
2. Access your Instant Notification settings (Vendor Settings >> My Site >> Advanced Tools >> Edit).
   > 📘 **Note**
   >
   > While you are setting up your postback in a vendor setting page, do not worry as this is the same page Vendors and Affiliates set their Postback URL. The parameters sent to affiliates are different than the parameters sent to Vendors.
3. Add the key: **AnyTrack**.
4. Paste (ctrl+v) the Postback URL in the Instant Notification URL Field.
5. Select **Version 8.0**.
6. Click on **Test IPN**.
7. Save (The IPN tracks the Sales, Upsells, and Rebills).

### Step #4: Order Form Tracking

1. [Access your Integrated Sales Reporting settings](https://accounts.ClickBank.com) (Vendor Settings >> My Site >> Integrated Sales Reporting >> Add Tracking Code).
2. Select "Tracking Tag" and click "Add".
3. Paste (ctrl+v) the postback URL in the Tracking Tag URL Field.
4. Select Track As: **"Affiliate"**.
5. Select **only** "Order Form".
6. **Save**

### Step #5: Adjust the Conversion Event Mapping

The [Event Mapping](/docs/event-mapping) allows you to define which events to track and map them to Conversion Events you will forward to your ad platform integrations (e.g., Facebook Conversion API).

***

## Validate Your Integration

> 📘 **Note**
>
> Install the [AnyTrack Pixel Helper](https://chromewebstore.google.com/detail/anytrack-pixel-helper/ojmhkmdpagjeopleoeihbhgejcfoijjn) Chrome extension to verify the AnyTrack Tracking Tag is installed on your website. It also shows connected ad platforms and browser-side events. [View the Pixel Helper guide](/docs/anytrack-chrome-extension).

### Link Tracking

Since tracking starts when visitors click on offer links, verify that your links are tracked and AutoTagged.

1. Load the website where you added the AnyTrack Tracking Tag.
2. Hover on the ClickBank offer URL.
3. Inspect the URL and look for the parameter appended to the URL: `extclid=kQECYO2xNgY4nMd88wypHAd0DHts1mhpy9`

### AutoTag Methods

> 📘 **Note**
>
> [AutoTag](/docs/autotag) is a function enabled by default through the AnyTrack Tracking Tag. It appends `extclid` and `click_id` data to affiliate links.

* **Default**: By default, AnyTrack automatically identifies and AutoTags ClickBank links found on your website. Like this [sample ClickBank link](https://280d7grip76d8x91tcba46qh7s.hop.ClickBank.net).
* **AutoScan**: AnyTrack scans links that are embedded in redirects plugins and AutoTags them accordingly.
* **Manual**:
  * **Tracking Group Attribute**: You add the tracking group attribute to links according to their tracking requirements. For example: `data-tracking-group="ClickBank"` or `rel="ClickBank"`. More about [Tracking Group](/docs/tgid).
  * **Click ID Token**: You manually append the `extclid`: `&extclid=--CLICK-ID--` to the offer link.

Once the links are set up, you can check in your ClickBank account reports and see whether the `extclid` parameters are passed to the offer links.

**Here is an example of how you would manually update links for ClickBank:**

```html
<a href="https://example.foo/goto/ClickBank" data-tracking-group="ClickBank">Hover on the ClickBank Demo Link to see the AnyTrack click_id</a>
```

<HTMLBlock html={"\n<a href=\"https://example.foo/goto/ClickBank\" data-tracking-group=\"ClickBank\">Hover on the ClickBank Demo Link to see the AnyTrack <code>click_id</code></a>\n"} />

> 📘 **Note**
>
> Tracking Group refers to the integration technology. For example, the ClickBank <Glossary>Tracking Group</Glossary> is `ClickBank` and the Rakuten group is `rakuten`. <Glossary>The Tracking Group</Glossary>

### Conversion Tracking

To validate your setup, wait for a conversion or trigger a test conversion yourself and inspect the conversion logs.

<Image align="center" className="border" border={true} src={readmeAsset4} />

### ClickBank Conversion Payload Example

> 📘 **Note**
>
> This is the new `extclid` parameter appended to the ClickBank hop link: `"extclid": "kQECYO2xNgY4nMd88wypHAd0DHts1mhpy9"`

```json ClickBank Order Page Payload
{
  "verificationHash": "135CBA87",
  "country": "US",
  "tracking_type": "direct",
  "click_timestamp": "2024-05-19T12:37:28.444230Z",
  "role": "AFFILIATE",
  "affiliateCommission": "0.00",
  "device_model": "Apple Macintosh",
  "os": "Mac OS",
  "city": "New York",
  "os_version": ">=10.15.7",
  "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
  "extclid": "kQECYO2xNgY4nMd88wypHAd0DHts1mhpy9",
  "device_type": "Desktop",
  "itemNo": "1",
  "productTitle": "Product Name Online Blueprint",
  "click_id": "6ec6b660-ff6e-47a9-979b-77d51e93d9c8",
  "device_brand": "Apple",
  "vendor": "vendorName",
  "browser": "Chrome",
  "browser_lang": "en",
  "browser_version": "126",
  "state": "New York",
  "affiliate": "anytrackio",
  "trackingCodes": "k0q0e0c0y0o2x0ng0y4n0md88wyp0h0ad000d0hts1mhpy9"
}
```

```json Purchase Event
{
  "affiliateTrackingParameters": {
    "extclid": "0dMIgXmvDOgivGxx31F2fNVJatcphsFHj" //AnyTrack Click ID parameter
  },
  "role": "AFFILIATE",
  "totalAccountAmount": 121.3,
  "commonTrackingParameters": {
    "deviceType": "Phone",
    "country": "US",
    "trackingType": "hop",
    "os": "Android",
    "useragent": "Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-S134DL) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/22.0 Chrome/111.0.5563.116 Mobile Safari/537.36",
    "clickTimestamp": "2024-09-30T13:25:16.059080697Z",
    "clickId": "ee8386b9-xx-434d-b24b-a619a43ee532",
    "osVersion": "13",
    "browser": "SamsungBrowser",
    "browserVersion": "22.0",
    "deviceModel": "Samsung SM-S134DL",
    "state": "Louisiana",
    "deviceBrand": "Samsung",
    "browserLang": "en"
  },
  "upsell": {},
  "attemptCount": 1,
  "transactionTime": "20240930T092316-0700",
  "version": 8,
  "transactionType": "SALE",
  "lineItems": [
    {
      "productTitle": "Three Bottles of Neuro-Thrive",
      "shippable": true,
      "quantity": 1,
      "recurring": false,
      "lineItemType": "STANDARD",
      "shippingLiable": false,
      "productDiscount": 0,
      "shippingAmount": 0,
      "itemNo": "neurothr-3b-v",
      "taxAmount": 13.28,
      "accountAmount": 121.3,
      "productPrice": 177
    }
  ],
  "totalOrderAmount": 190.28,
  "vendor": "neurothriv",
  "paymentMethod": "VISA",
  "receipt": "xxxxx",
  "affiliate": "xxxxxx",
  "trackingCodes": [
    "00d0m0ig0xmv0d0ogiv0g0fkw310f2f0n0v0jatcphs0f0hj" //Previous version Click ID parameter
  ],
  "customer": {
    "billing": {
      "address": {
        "country": "US",
        "state": "FL",
        "postalCode": "32526"
      }
    }
  }
}
```

***

<FaqAccordion
  title="FAQ and Troubleshooting"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "How do I get access to the new ClickBank tracking parameters?",
      answer: "You need to ask your ClickBank affiliate manager to enable the new tracking parameters on your account."
    },
    {
      question: "How do I verify that my account uses the new tracking method?",
      answer: "The payload of the order page impression should include the extclid parameter along with device, location, and click timestamp data. Check your conversion logs in the AnyTrack Dashboard for the extclid field."
    },
    {
      question: "Can I track direct linking campaigns?",
      answer: "Yes. If you want to send ad traffic from Google or Facebook directly to ClickBank offer links, refer to the <a href='/docs/deeplink'>Direct Linking guide</a>."
    },
    {
      question: "Can I use a different subid parameter than the one predefined in AnyTrack?",
      answer: "No. The extclid parameter is set by ClickBank and modifying it would prevent tracking conversions."
    },
    {
      question: "Can I track conversions without the click_id?",
      answer: "No. The click_id passed to the ClickBank links is required to attribute conversions back to the original traffic source."
    },
    {
      question: "The Conversion Event Name is not what I expected. How can I change it?",
      answer: "You can update the <a href='/docs/event-mapping'>Event Mapping</a> in the Integration page to change how ClickBank events map to your ad platform conversion events."
    }
  ]}
/>

{/* Removed broken prohelp.com.ua image: https://prohelp.com.ua/tmp/ClickBank/actions.jpg */}
