# JVZoo Integration

> Connect JVZoo to AnyTrack with a Custom Integration and two JVZoo S2S postbacks, so AnyTrack attributes JVZoo checkouts and sales to the ad click.

## What the JVZoo Setup Does

JVZoo sends two events to AnyTrack through server-to-server (S2S) postbacks: an `InitiateCheckout` when your visitor opens the JVZoo checkout page, and a `Purchase` for each sale. AnyTrack attributes each event to the ad click and the traffic source of the visit that started on your website.

JVZoo is not in the [Integration Catalog](/docs/integration-catalog). You connect it with a [Postback URL integration](/docs/custom) (a Custom Integration). Custom integrations are available on the Personal plan and higher ([plan comparison](/docs/plan-comparison)).

AnyTrack sends these events to your ad platforms through the [Conversion API](/docs/conversion-api). The Free plan does not include the Conversion API.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an AnyTrack account on the Personal plan or higher, with a Property for your website", done: true },
    { label: "You have a JVZoo affiliate account", done: true },
    { label: "The AnyTrack Tag is installed on the pages that hold your JVZoo affiliate links", done: true },
  ]}
/>

<Callout icon="❗" theme="error">
**AnyTrack Tag required**

The JVZoo setup only works when the AnyTrack Tracking Tag is installed in the `head` section of your website, funnel, or landing pages. Learn how to [Install the AnyTrack Tag](/docs/install-anytrack-tag) on your website.
</Callout>

## How the Integration Works

1. **Session:** A visitor clicks your ad and lands on your website. The AnyTrack Tag records the traffic source and creates a [Click ID](/docs/anytrack-click-id).
2. **Click ID handoff:** The visitor clicks your JVZoo affiliate link. [AutoTag](/docs/autotag) replaces the `--CLICK-ID--` token in the `sub_id5` parameter with the Click ID.
3. **Postbacks:** The visitor opens the JVZoo checkout page, then buys. At each step, JVZoo calls the AnyTrack postback URL and puts the Click ID in the `{sub_id5}` placeholder.
4. **Attribution:** AnyTrack matches the Click ID to the visit and records the event that the postback names in `event_name`.

## Events

| Event | JVZoo postback type | When JVZoo sends it | Value |
| :---- | :------------------ | :------------------ | :---- |
| `InitiateCheckout` | Initiated | The visitor opens the JVZoo checkout page. | None. JVZoo sends no transaction data with this type. |
| `Purchase` | Purchase | The sale is complete. | Your commission, from `{affiliate_amount}`. |

<Callout icon="🚧" theme="warn">
**Event names are case-sensitive**

AnyTrack keeps the case of `event_name`. Send `Purchase` and `InitiateCheckout` exactly as written. For example, `event_name=purchase` records a custom event named `purchase`, not a `Purchase`.
</Callout>

<Callout icon="🚧" theme="warn">
**Use sub_id5, not tid**

The JVZoo `tid` accepts up to 24 lowercase letters and numbers. The AnyTrack Click ID has 34 characters in mixed case ([AnyTrack Identifiers](/docs/anytrack-identifiers)). JVZoo sends long click IDs in the Sub IDs, `{sub_id1}` to `{sub_id5}`, which accept up to 512 characters.
</Callout>

## Set Up JVZoo

### Step 1: Tag Your JVZoo Affiliate Links

Add `sub_id5=--CLICK-ID--` to each JVZoo affiliate link on your website:

```
https://www.jvzoo.com/c/<affiliate-id>/<product-id>/?sub_id5=--CLICK-ID--
```

If the link already has a `?`, add `&sub_id5=--CLICK-ID--` to the end of the link.

`sub_id5` keeps `tid` and `sub_id1` to `sub_id4` free for your own tracking.

### Step 2: Create a Custom Integration in AnyTrack

1. In your [AnyTrack dashboard](https://dashboard.anytrack.io/catalog/), open the Integration Catalog.
2. Search for **Custom Integration** and click **Install**.
3. In **Name**, type `JVZoo`.
4. Fill in the placeholders with the JVZoo values in this table.
5. Click **Save**. AnyTrack shows the postback URL of the integration.

| AnyTrack field | JVZoo placeholder |
| :------------- | :---------------- |
| **Sub ID/Click ID Placeholder** | `{sub_id5}` |
| **Commission/Payout Placeholder** | `{affiliate_amount}` |
| **Transaction ID Placeholder** | `{transaction_id}` |
| **Product/Brand Name** | `{product_name}` |

### Step 3: Build the Two Postback URLs

Both postbacks use the same AnyTrack postback URL. Only the parameters are different.

**Purchase postback URL.** Copy the postback URL from AnyTrack. Keep all its parameters. Add these parameters to the end of the URL:

```
&currency={currency}&event_name=Purchase&email={customer_email}&full_name={customer_name}&country={customer_country}
```

The complete Purchase postback URL has this format. Use the URL from your AnyTrack account, not this example:

```http
https://t1.anytrack.io/xxxxxxxx/collect/jvzoo?click_id={sub_id5}&commission={affiliate_amount}&transaction_id={transaction_id}&brand_name={product_name}&currency={currency}&event_name=Purchase&email={customer_email}&full_name={customer_name}&country={customer_country}
```

| Parameter | JVZoo placeholder | What AnyTrack does with it |
| :-------- | :---------------- | :------------------------- |
| `click_id` | `{sub_id5}` | Matches the sale to the visit. |
| `commission` | `{affiliate_amount}` | Uses your commission as the conversion value. |
| `transaction_id` | `{transaction_id}` | Uses it as the transaction ID. |
| `brand_name` | `{product_name}` | Records the product name. |
| `currency` | `{currency}` | Sets the currency of the value. |
| `event_name` | `Purchase` (fixed value) | Records a `Purchase`. |
| `email`, `full_name`, `country` | `{customer_email}`, `{customer_name}`, `{customer_country}` | Adds the buyer data to the conversion. |

The buyer data helps ad platforms match the sale to a user. See [Event Attributes](/docs/event-attributes). The full parameter list is in [Custom Integration Parameters](/docs/custom-integration-parameters).

**Initiated postback URL.** Copy the part of the AnyTrack postback URL before the `?`. Add these parameters:

```
?click_id={sub_id5}&event_name=InitiateCheckout&country={country}
```

The complete Initiated postback URL has this format:

```http
https://t1.anytrack.io/xxxxxxxx/collect/jvzoo?click_id={sub_id5}&event_name=InitiateCheckout&country={country}
```

The Initiated type has no transaction placeholders. Do not add `{affiliate_amount}`, `{transaction_id}`, or `{currency}` to this URL. `{country}` is the country code of the visitor.

### Step 4: Add the Two Postbacks in JVZoo

Add the Purchase postback first.

1. Log in to JVZoo.
2. Click **My Account** > **Account Details**.
3. Scroll down to **Affiliate Settings**.
4. Click **Manage S2S Postbacks**.
5. Click **Add New Postback**.
6. In **Name**, type `AnyTrack - Purchase`.
7. In **Type**, select **Purchase**.
8. In **Postback URL**, paste the Purchase postback URL from Step 3.
9. Set **Status** to **Active**.
10. In **Product Scope**, select **All Products**.
11. Save the postback.

Then add the Initiated postback:

1. In **Manage S2S Postbacks**, click **Add New Postback**.
2. In **Name**, type `AnyTrack - InitiateCheckout`.
3. In **Type**, select **Initiated**.
4. In **Postback URL**, paste the Initiated postback URL from Step 3.
5. Set **Status** to **Active**.
6. In **Product Scope**, select **All Products**.
7. Save the postback.

The Initiated postback fires on each checkout page visit in its product scope.

## Verify Your Integration

* [ ] The AnyTrack Tag loads on the page that holds your JVZoo affiliate link.
* [ ] When you point to the link on your page, the link shows a Click ID in `sub_id5`, not the `--CLICK-ID--` token.
* [ ] The JVZoo postback log of each postback shows the call with the Click ID in `click_id`. To open the log, go to **Manage S2S Postbacks** and click the log icon of the postback.
* [ ] The [Events Log](/docs/integration-event-log) of the JVZoo integration in AnyTrack shows a valid `InitiateCheckout` for the checkout visit and a valid `Purchase` for the sale.

## Troubleshoot Missing Conversions

Open the JVZoo postback log and the AnyTrack [Events Log](/docs/integration-event-log) first.

- **The JVZoo log shows no call:** the postback is not active, or the product is not in its scope. Verify **Status** and **Product Scope**.
- **`click_id` is empty in the call:** the Click ID did not reach JVZoo. Verify that the affiliate link has `sub_id5=--CLICK-ID--` and that the page loads the AnyTrack Tag.
- **`click_id` shows `--CLICK-ID--`:** AutoTag did not replace the token. Verify that the link is a standard `a` element on a page with the AnyTrack Tag. Do not put the token inside a link shortener or a redirect plugin.
- **The event has the wrong name:** `event_name` is case-sensitive. Verify that the URLs send `Purchase` and `InitiateCheckout` exactly.
- **The call arrives but is not valid:** copy the event reference from the Events Log and [contact support](/docs/contact-support).

## Related Resources

- [Postback URL Integration](/docs/custom)
- [Custom Integration Parameters](/docs/custom-integration-parameters)
- [Custom Affiliate Networks](/docs/custom-affiliate-networks)
- [AutoTag](/docs/autotag)
- [Events Log](/docs/integration-event-log)

<FaqAccordion
  title="Frequently Asked Questions"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "How do I track JVZoo sales in AnyTrack?",
      answer: "Create a Custom Integration in AnyTrack. Add <code>sub_id5=--CLICK-ID--</code> to your JVZoo affiliate links. Add the AnyTrack postback URL in JVZoo as a Purchase postback, with <code>click_id={sub_id5}</code> and <code>event_name=Purchase</code>. To track checkouts too, add an Initiated postback with <code>event_name=InitiateCheckout</code>. AnyTrack then attributes each JVZoo checkout and sale to the ad click. Custom integrations are available on the Personal plan and higher."
    },
    {
      question: "Why not use the JVZoo tid for the Click ID?",
      answer: "The JVZoo <code>tid</code> accepts up to 24 lowercase letters and numbers. The AnyTrack Click ID has 34 characters in mixed case. Use <code>sub_id5</code>, which accepts up to 512 characters."
    },
    {
      question: "Which value does AnyTrack record for a JVZoo sale?",
      answer: "AnyTrack records your affiliate commission, from the <code>{affiliate_amount}</code> placeholder, in the currency from <code>{currency}</code>."
    },
    {
      question: "Why does the InitiateCheckout event have no value?",
      answer: "The JVZoo Initiated postback fires when the visitor opens the checkout page, before any payment. JVZoo sends no transaction data with it, so AnyTrack records the InitiateCheckout without a value."
    },
    {
      question: "Do JVZoo events reach my ad platforms?",
      answer: "Yes, on plans that include the Conversion API and custom integrations (Personal and higher). Set the <a href='/docs/event-mapping'>Event Mapping</a> of each ad integration to send Purchase and InitiateCheckout."
    }
  ]}
/>
