> For the complete documentation index, see [llms.txt](https://docs.roivenue.com/roivenue-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roivenue.com/roivenue-resources/roivenue-training/roivenue-app/data/connectors-overview/list-of-connectors/cj-affiliate.md).

# CJ Affiliate

How to connect CJ Affiliate to Roivenue, what the default setup downloads, and how the figures are put together.

CJ Affiliate, formerly Commission Junction, is a global affiliate network. The Roivenue connector downloads each commissionable transaction, with the commission and network fee as its cost.

## Setting up the connector

Add a CJ Affiliate connector in Roivenue and paste a Personal Access Token generated in your CJ account.

## What the default setup downloads

One job, bringing back one row per transaction.

### Where the values land

| CJ Affiliate field                       | Roivenue column |
| ---------------------------------------- | --------------- |
| `websiteId`                              | adCampaign      |
| `websiteName`                            | adGroup         |
| `saleAmountUsd`                          | conversionValue |
| `pubCommissionAmountUsd` plus `cjFeeUsd` | cost            |

Each row is one transaction rather than a day of campaign activity, so conversions is always 1 and the sale amount lands in conversionValue. Impressions and clicks are set to zero, because an affiliate network does not report them. Cost per click and click-through rate are therefore not meaningful on this connector, while cost per acquisition and return on spend are.

{% hint style="warning" %}
Figures arrive in US dollars and every row is stamped USD, because the template reads CJ's dollar-denominated fields. If your account bills in another currency, these values need converting before they can be compared with other connectors.
{% endhint %}

The job reprocesses the last 90 days on every run, because affiliate transactions are validated long after the sale.

## Available columns

The table above is what the recommended template downloads. Every column this connector can bring back is listed on [CJ Affiliate - Supported Columns](/roivenue-resources/roivenue-training/roivenue-app/data/connectors-overview/list-of-connectors/cj-affiliate/cj-affiliate-supported-columns.md).

Adding one means editing the connector in the Advanced Editor, which stops that connector receiving template updates.

## How far back the data goes

The connector will request up to three years of history. How much arrives depends on what the platform holds for the account.

## Troubleshooting

<details>

<summary>Everything is in US dollars</summary>

The template reads CJ's USD fields and stamps every row USD. That is deliberate rather than a fault, but it means CJ spend is not directly comparable with connectors reporting in your local currency.

</details>

<details>

<summary>Cost per click is empty</summary>

Affiliate networks do not report clicks or impressions, so both are zero on this connector. Use cost per acquisition instead.

</details>
