# TrafficJunky

> Set up TrafficJunky as a traffic source, send it your conversions, and pull your spend automatically.

This page shows you how to set up TrafficJunky in Proferex: track its clicks, send it your conversions, and pull your ad spend automatically.

---

## Apply the template

Go to **Tracker → Traffic Sources**, click **Create Traffic Source**, then **Templates → TrafficJunky**. The template fills in everything below. You only need to change the parts marked **You fill in**.

If you set it up by hand instead, copy the values exactly. TrafficJunky's tokens are case-sensitive, so `{CampaignID}` works and `{campaignid}` does not.

---

## Variable mappings

| Variable | URL parameter | TrafficJunky token |
|---|---|---|
| External ID | `externalid` | `{aclid}` |
| Cost (CPC) | Left empty | Left empty |
| v1 Banner Name | `ban_name` | `{BanName}` |
| v2 Site | `site_name` | `{SiteName}` |
| v3 Bid Value | `bid_value` | `{BidValue}` |
| v4 Spot Name | `spot_name` | `{SpotName}` |
| v5 Campaign ID | `campaign_id` | `{CampaignID}` |
| v6 Ad Name | `ad_name` | `{AdName}` |
| v7 Ad ID | `ad_id` | `{AdID}` |
| v8 Bid ID | `bid_id` | `{BidID}` |
| v9 Spot ID | `spot_id` | `{SpotID}` |
| v10 Banner ID | `ban_id` | `{BanID}` |

**Cost (CPC)** is empty on purpose. TrafficJunky does not pass the click's cost in the link, so costs come from cost sync instead.

---

## Postback URL

The template fills in this address:

```text
https://ads.trafficjunky.net/tj_ads_pt?a=YOUR_TOKEN&member_id=YOUR_MEMBER_ID&cti={clickid}&ctv={payout}&aclid={externalid}
```

![The TrafficJunky adapter selected and its postback URL with YOUR_TOKEN and YOUR_MEMBER_ID](/images/docs/trafficjunky-postback.jpg "Replace the two placeholders in capitals")

**You fill in:** replace `YOUR_TOKEN` and `YOUR_MEMBER_ID` with the two values from your conversion tracking setup in TrafficJunky. Leave the rest as it is.

---

## Cost sync

The template sets **Traffic Source Adapter** to **Traffic Junky**.

![The TrafficJunky API Key field, API Timezone set to America/New_York, and Campaign ID Token set to v5](/images/docs/trafficjunky-api.jpg "Paste your API key. The rest is set for you")

- **You fill in:** paste your API key into **API Key**. In TrafficJunky, open **My Profile**, scroll to **Connect with TrafficJunky API**, and click **Generate New Token**.
- **API Timezone** is New York time, the timezone TrafficJunky reports spend in. You cannot change it.
- **Traffic source currency** is USD, the currency TrafficJunky reports in.
- **Campaign ID Token** is `v5`, the row that carries `{CampaignID}`. Keep it that way, or cost sync cannot match spend to your clicks.

**Don't want cost sync?** Set **Traffic Source Adapter** to **None (Manual Cost Tracking)** and leave the API key empty. Everything else keeps working. Since TrafficJunky passes no cost in the link, set a cost on each campaign instead. See [Costs](/docs/tracker/costs/index.md).

---

## Control the campaign from Proferex

Once cost sync is set up, click **API** at the top of a TrafficJunky campaign's page in Proferex.

![The Traffic Source API Integration window for TrafficJunky, with cost sync active, the CPM model, the traffic source campaign ID 1009834512, and the Campaign Overview, Sources, Ads, Pause, and Resume buttons](/images/docs/api-trafficjunky.jpg "Open the campaign's spots and ads, or pause and resume it")

1. Under **Traffic Source Campaign ID**, pick the TrafficJunky campaign. Proferex lists the IDs it has seen in `{CampaignID}` on this campaign's visits.
2. Click a button:
   - **Campaign Overview** opens the campaign in TrafficJunky.
   - **Sources** opens the campaign's list of spots in TrafficJunky. Block the spots that lose money there.
   - **Ads** opens the campaign's ads in TrafficJunky.
   - **Pause** and **Resume** pause and restart the campaign straight away.

To find the spots to block, group the campaign by **V9**, the spot ID. See [Campaign Reports](/docs/reports/campaign-reports/index.md#block-a-losing-spot-in-one-campaign).

---

## Next step

Save the traffic source, then create a campaign with it. See [Campaigns](/docs/tracker/campaigns/index.md).
