# LeadBazaar

> Learn how to connect LeadBazaar affiliate management with AnyTrack for conversion tracking and reporting. Set up postback URLs and event mapping to track affiliate conversions and optimize your campaigns.

## LeadBazaar Integration Overview

LeadBazaar and AnyTrack integration makes it easy to manage all your conversion tracking in one place. With the integration, data from LeadBazaar is sent directly to AnyTrack which then forwards it on to platforms such as Google Ads, Facebook Conversion API and TikTok API. This allows you to see how effective your campaigns are across multiple channels without having duplicate or missing conversions. Keeping track of performance metrics has never been easier!

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

### How does the LeadBazaar AnyTrack integration work:

1. **Traffic**: When visitors land on your website, AnyTrack collects traffic source data and First Party data.
2. **Engagements**: When visitors click on your LeadBazaar 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. **Conversions:** When visitors convert on the merchant's website, AnyTrack receives real time conversion data through Postback URL.
4. **Attribution:** AnyTrack processes the conversion data and reports it across various reporting sections of the AnyTrack Dashboard.
5. **Conversion API:** AnyTrack then sends your conversions to your **Ad Platforms' Conversion API** so you can feed your ad platform's Machine Learning, AI and automatic optimization according to 100% of your conversion data.

### Technical details

| Reference       | Value          | Information                                                                        |
| --------------- | :------------- | :--------------------------------------------------------------------------------- |
| Tracking Group  | `leadbazaar`   | The Tracking Group reference can be used to activate <Glossary>AutoTag</Glossary>. |
| Subid Parameter | `sub1`         | The Subid Parameter used to pass the AnyTrack `click_id`.                          |
| Tracking Method | `Postback URL` | -                                                                                  |

### Standard Conversions

| Event Name      | Details                                             | Data Source     |
| :-------------- | :-------------------------------------------------- | :-------------- |
| `OutboundClick` | When a visitor clicks on LeadBazaar offer links.    | AnyTrack JS Tag |
| `Lead`          | When a free registration is recorded in LeadBazaar. | Postback URL    |
| `Purchase`      | When a user generates a commission in LeadBazaar.   | Postback URL    |

### The LeadBazaar Postback URL

The Postback URL is fully pre-defined and ready to be implemented with your LeadBazaar account.

```http
https://t1.anytrack.io/hBtoE3hN/collect/leadbazaar?uagent={uagent}&ip={ip}&sub1={sub1}&sub2={sub2}&sub3={sub3}&sub4={sub4}&sub5={sub5}&sub6={sub6}&sub7={sub7}&sub8={sub8}&unid={unid}&ref_id={ref_id}&os_id={os_id}&user_id={user_id}&ext1={ext1}&ext2={ext2}&ext3={ext3}&transactionid={transactionid}&date={date}&click_date={click_date}&offerid={offerid}&offer_name={offer_name}&status={status}&sum={sum}&city={city}&geo={geo}&goal={goal}&currency={currency}&comment={comment}&time={time}&date_only={date_only}&rand={rand}&referrer={referrer}&custom_field_1={custom_field_1}&custom_field_2={custom_field_2}&custom_field_3={custom_field_3}&custom_field_4={custom_field_4}&custom_field_5={custom_field_5}&custom_field_6={custom_field_6}&custom_field_7={custom_field_7}&custom_field1={custom_field1}&custom_field2={custom_field2}&custom_field3={custom_field3}&custom_field4={custom_field4}&custom_field5={custom_field5}&custom_field6={custom_field6}&custom_field7={custom_field7}&os={os}&timestamp={timestamp}
```

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

## Setup Guide

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

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

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

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

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

### Step #2: Connect your LeadBazaar account

1. Copy the predefined Postback URL
2. Navigate to \[your profile]\([https://my.leadbazaar.co/profile"](https://my.leadbazaar.co/profile")  [https://my.leadbazaar.co/profile](https://my.leadbazaar.co/profile)) / settings page
3. Scroll down to the Global Postback settings
4. Click on Add Postback
5. Paste the postback URL
6. Select "Any" Status and Save

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

The Event Mapping allows you to define which events to track and map them to Conversion Events you will forward to your Ads Integrations (ex: Facebook Conversion API)

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

***

## Validate your integration

This section will enable you to validate the main aspects of your setup.

### Link tracking

Since Tracking starts when visitors clicks on offer links, you should verify that your links are tracked and AutoTagged.

### AutoTag Methods

<Callout icon="🔥" theme="default">
  ### Reminder about AutoTag:

  **AutoTag** is a function that is enabled by default through the AnyTrack Tracking Tag, and that appends `sub1` & `click_id` data to affiliate links. Learn [more about AutoTag](/docs/autotag).
</Callout>

* **Default**: By default, AnyTrack automatically identifies and AutoTags LeadBazaar links found on your website.
* **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="affise"` or `rel="affise"`. More about [Tracking Group](/docs/tgid).
  * **Click ID Token:** You Manually append the `subid`: `&sub1=--CLICK-ID--` to the offer link.

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

**Here is an example of how you would manually update links from`affise`:**

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

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

> 📘 **Tracking**
>
> Tracking Group refers to the integration technology. For example, LeadBazaar <Glossary>Tracking Group</Glossary> tracking group is `affise` and ClickBank is `ClickBank`. <Glossary>The Tracking Group</Glossary>

### Conversion Tracking

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

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

**LeadBazaar conversion payload example**

```json

{
  "AnyTrack": "1100l35864",
  "customer_type": "existing",
  "country": "US",
  "referer": "https://www.chewy.com/",
  "search_keyword": null,
  "search_engine_id": null,
  "conversion_time": "1684692689",
  "`conversion_id`": "1011l2002827904",
  "publisher_reference":"mz7yYainzaN6hkc52QVBg",
  "publisher_commission": "10.57",
  "creative_id": "0",
  "source_referer": null,
  "advertiser_reference": null,
  "conversion_type": "1",
  "creative_type": "0",
  "conversion_reference": "1354998698",
  "metadata_query_string": null,
  "currency": "USD",
  "tracking_method": "clickref",
  "value": "52.85",
  "items": [
    {
      "item_code": null,
      "item_id": "1011l860699483",
      "item_sku": "332503",
      "item_commission": "3.5720",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "3.5720",
      "item_meta": null,
      "item_status": "1",
      "item_value": "17.8600",
      "item_category": "11130",
      "item_vertical": null
    },
    {
      "item_code": null,
      "item_id": "1011l860699484",
      "item_sku": null,
      "item_commission": "0.0000",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "0.0000",
      "item_meta": null,
      "item_status": "1",
      "item_value": "0.0000",
      "item_category": "COMMISSION",
      "item_vertical": null
    },
    {
      "item_code": null,
      "item_id": "1101l859617416",
      "item_sku": "677350",
      "item_commission": "6.9980",
      "item_type": "S",
      "item_gp": null,
      "item_publisher_commission": "6.9980",
      "item_meta": null,
      "item_status": "1",
      "item_value": "34.9900",
      "item_category": "2802",
      "item_vertical": null
    }
  ],
  "campaign_id": "1100l517",
  "query_string": null,
  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1"
}

```

***

## FAQ & Troubleshooting

* ### Can I import past conversions into AnyTrack?
  No. AnyTrack can only ingest conversions that have been triggered following a visitor session on your website.
* ### Can I track direct linking campaigns?
  Yes, but this requires a custom setup. Please refer to this [article](/docs/deeplink).
* ### Can I use a different `subid` parameter than the one predefined by AnyTrack?
  No.
* ### Can I track conversions without the `click_id`?
  No. The `click_id` passed to the LeadBazaar links is required to track conversions.
* ### The Conversion Event Name is not what I am expecting, how can I change it?
  You can update the Event Mapping in the Integration page.

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

## Take these steps to troubleshoot errors you encounter in AnyTrack

* ### General troubleshooting
  * [ ] Verify that your tracking tag is set in the `head` section of your website.
  * [ ] If you're on the free plan, verify that you didn't reach the monthly traffic limit and [upgrade](https://dashboard.anytrack.io/billing) if needed.
* ### Conversion sources
  When you are not tracking conversions, or most conversions trigger an error follow the guidelines below.

> 🚧 ****
>
> Before you reach out to the tech support, please inspect the [conversion log](/docs/integration-event-log) to see what type of errors you are getting and try to fix the integration by following these troubleshooting guidelines.

* ### Native integrations
  Native integrations refer to platforms that are predefined in the catalog and should provide an error-free data flow.\
  The most common error is that the `click_id` is unknown or missing. It happens when AutoTag could not be activated.
  * [ ] Check that your links are not hidden behind some javascripts or double redirects.
  * [ ] Check that the links are in a standard `a` element.
  * [ ] Try to manually set the tracking group attribute (check the integration guidelines).
  * [ ] Check whether your offers are not getting traffic from websites where the AnyTrack Tag isn't set.
  * [ ] If you just installed AnyTrack, errors might be  from traffic that wasn't tracked by AnyTrack.
  * #### Conversion data doesn't trigger an error 🔴, but is not validated 🟢:
    * [ ] Check that the Postback URL you've set in the integration matches the pre-defined Postback URL we provide.
    * [ ] Copy the Event Reference from the Conversion Event Log and contact the [support](/docs/contact-support).
  * #### You're not getting any conversions:
  * [ ] Check that the Postback URL is set and active in your platform.
  * [ ] Check that you're passing the correct AutoTag `sub1` parameter to the offer link.
  * [ ] Check that the Postback URL is correctly inserted in the custom integration.
