# Admitad

> The Admitad and AnyTrack integration enables automatic synchronization of campaigns, ensuring accurate conversion tracking by sending data from Admitad to AnyTrack, which then forwards it to platforms like Google Ads and Facebook `Conversion API`. This integration allows advertisers to optimize their campaigns by providing precise metrics on click-through rates and cost per acquisition. The setup involves adding Admitad to AnyTrack, connecting accounts via a predefined Postback URL, and mapping conversion events for effective ad platform integration.

## Admitad Integration Overview

The Admitad and AnyTrack integration syncs your campaigns between the two platforms, ensuring that all conversions are tracked accurately. Conversion data is sent from Admitad directly into AnyTrack, which then forwards it to Google Ads, Facebook `Conversion API`, and TikTok API.

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

### How the Integration Works

1. **Traffic**: When visitors land on your website, AnyTrack collects traffic source data and first-party data.
2. **Engagements**: When visitors click on your Admitad affiliate links, AnyTrack collects granular data tied to the `OutboundClick` and 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 the Postback URL.
4. **Attribution:** AnyTrack processes the conversion data and reports it across the AnyTrack Dashboard.
5. **`Conversion API`:** AnyTrack sends your conversions to your ad platforms' `Conversion API` for machine learning optimization.

### Technical Details

| Reference       | Value          | Information                                                                        |
| --------------- | :------------- | :--------------------------------------------------------------------------------- |
| Tracking Group  | `admitad`      | The Tracking Group reference can be used to activate <Glossary>AutoTag</Glossary>. |
| Subid Parameter | `subid4`       | 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 Admitad offer links.    | AnyTrack JS Tag |
| `Lead`          | When a free registration is recorded in Admitad. | Postback URL    |
| `Purchase`      | When a user generates a commission in Admitad.   | Postback URL    |

### The Admitad Postback URL

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

```http
https://t1.anytrack.io/hBtoE3hN/collect/admitad-test?offer_id=[[[offer_id]]]&offer_name=[[[offer_name]]]&admitad_id=[[[admitad_id]]]&website_name=[[[website_name]]]&website_id=[[[website_id]]]&`subid`=[[[`subid`]]]&action=[[[action]]]&subid1=[[[subid1]]]&subid2=[[[subid2]]]&subid3=[[[subid3]]]&subid4=[[[subid4]]]&payment_sum=[[[payment_sum]]]&payment_status=[[[payment_status]]]&currency=[[[currency]]]&`order_id`=[[[`order_id`]]]&order_sum=[[[order_sum]]]&click_time=[[[click_time]]]&time=[[[time]]]&conversion_time=[[[conversion_time]]]&type=[[[type]]]&country_code=[[[country_code]]]&user_agent=[[[user_agent]]]&user_referer=[[[user_referer]]]&action_id=[[[action_id]]]
```

***

## Setup Guide

### Step 1: Add Admitad to Your AnyTrack Account

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

2. Click on the [Admitad card](https://dashboard.anytrack.io/catalog/admitad) and then click **Install**.

### Step 2: Connect Your Admitad Account

1. Copy the predefined Postback URL.
2. Login to your Admitad affiliate panel.
3. Select **Postback URL** in the **Tools** menu.
4. Click **Add postback URL**.
5. On the **Event type** dropdown, select **Action**.
6. Select **All ad spaces** for which you wish to retrieve statistics from.
7. Leave **Program** as **All programs**.
8. Keep **HTTP Method** on **GET**.
9. Paste the Postback URL from above under **Link**.
10. Click on **Test** to verify your setting.
11. **Save** your settings.

### Step 3: 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

<Callout icon="🔎" theme="default">
  ### Install the AnyTrack Pixel Helper Extension

  Install the [AnyTrack Pixel Helper](https://chromewebstore.google.com/detail/anytrack-pixel-helper/ojmhkmdpagjeopleoeihbhgejcfoijjn) Chrome extension to verify the AnyTrack 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).
</Callout>

### Link Tracking

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

### AutoTag Methods

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

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

* **Default**: By default, AnyTrack automatically identifies and AutoTags Admitad links found on your website.
* **AutoScan**: AnyTrack scans links that are embedded in redirect plugins and AutoTags them accordingly.
* **Manual**:
  * **Tracking Group Attribute**: Add the tracking group attribute to links according to their tracking requirements. For example: `data-tracking-group="admitad"` or `rel="admitad"`. More about [Tracking Group](/docs/tgid).
  * **Click ID Token:** Manually append the `subid`: `&subid4=--CLICK-ID--` to the offer link.

Once the links are set up, check in your Admitad account reports to confirm that `subid4` parameters are passed to the offer links.

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

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

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

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

### Conversion Tracking

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

**Admitad 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"
}
```

***

<FaqAccordion
  title="FAQ and Troubleshooting"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Can I import past conversions into AnyTrack?",
      answer: "No. AnyTrack can only ingest conversions that have been triggered following a visitor session on your website. Historical conversions cannot be imported."
    },
    {
      question: "Can I track direct linking campaigns?",
      answer: "Yes, but this requires a custom setup. Refer to the Direct Link Tracking documentation in your AnyTrack dashboard for configuration details."
    },
    {
      question: "Can I use a different <code>subid</code> parameter than the one predefined by AnyTrack?",
      answer: "No. The predefined <code>subid</code> parameter (subid4) is required for AnyTrack to attribute conversions correctly."
    },
    {
      question: "Can I track conversions without the <code>click_id</code>?",
      answer: "No. The <code>click_id</code> passed to the Admitad links is required to track and attribute conversions to the correct visitor session."
    },
    {
      question: "The conversion event name is not what I expected. How can I change it?",
      answer: "You can update the Event Mapping in the Integration page within your AnyTrack dashboard. This allows you to map Admitad events to the conversion names your ad platforms expect."
    }
  ]}
/>
