# Twinspires Affiliates

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

## What is the Twinspires Affiliates Integration?

The Twinspires Affiliates integration connects your affiliate marketing campaigns with AnyTrack's conversion tracking system. This integration automatically captures visitor data, tracks affiliate link clicks, and records conversions from Twinspires Affiliates offers.

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

## Why Use This Integration?

**Track Every Conversion**
Get complete visibility into your affiliate performance with real-time conversion data from Twinspires Affiliates to AnyTrack.

**Optimize Ad Campaigns**
Feed accurate conversion data to <a href='/docs/google-ads'>Google Ads</a>, <a href='/docs/facebook-ads'>Facebook Ads</a>, and <a href='/docs/tiktok-ads'>TikTok Ads</a> for automatic campaign optimization.

**Maximize ROI**
Make data-driven decisions with detailed attribution reports showing which traffic sources generate the most valuable conversions.

## How the Integration Works

### The 4-Step Process

1. **Visitor Arrives**: AnyTrack captures traffic source data and visitor information when someone lands on your website.

2. **Link Click Tracked**: When visitors click your Twinspires Affiliates affiliate links, AnyTrack:
   * Records detailed click data
   * Sends events to your Tracking Tags
   * Adds a unique identifier (`click_id`) to the link

3. **Conversion Recorded**: When visitors convert on Twinspires Affiliates, the platform sends conversion data back to AnyTrack in real-time.

4. **Data Distributed**: AnyTrack processes the conversion and sends it to your ad platforms (<a href='/docs/google-ads'>Google Ads</a>, <a href='/docs/facebook-ads'>Facebook Ads</a>, <a href='/docs/tiktok-ads'>TikTok Ads</a>) for campaign optimization.

## Integration Details

| Setting         | Value             | Purpose                                                                            |
| --------------- | ----------------- | ---------------------------------------------------------------------------------- |
| Tracking Group  | `incomeaccess`    | Activates automatic link tagging for Twinspires Affiliates links                         |
| Subid Parameter | `c`         | Passes the unique click identifier to track conversions back to the original click |
| Method          | API Integration   | Real-time data connection between Twinspires Affiliates and AnyTrack                     |

> 📘 **About**
>
> All IncomeAccess-powered programs use the same tracking technology. When manually tagging links, always use `data-tracking-group="incomeaccess"` regardless of which specific program you're promoting.

## Tracked Events

| Event         | When It Triggers                          | Data Source                  |
| ------------- | ----------------------------------------- | ---------------------------- |
| OutboundClick | Visitor clicks a Twinspires Affiliates offer link | AnyTrack tracking tag        |
| Lead          | Free registration completed on Twinspires Affiliates | Direct API from Twinspires Affiliates |
| Purchase      | Commission generated from user activity   | Direct API from Twinspires Affiliates |

## Setup Instructions

### Step 1: Install the Integration

1. Go to your **[AnyTrack Integration Catalog](https://dashboard.anytrack.io/catalog/)**
2. Search for "Twinspires Affiliates"
3. Click the **Twinspires Affiliates card**
4. Click **Install**

### Step 2: Generate Security Key

To connect your Twinspires Affiliates account to AnyTrack:

1. Log into your [Twinspires Affiliates affiliate dashboard](https://affiliates.twinspires.com)
2. Navigate to **Settings** > **API** or **Security Keys**
3. Click **Generate New Key**
4. Set IP whitelist to `0.0.0.0/0` (allows AnyTrack's servers to receive conversions)
5. Copy the security key

> 📘 **Why**
>
> AnyTrack's servers use dynamic IP addresses, so whitelisting all IPs ensures conversions are always received. This is a standard configuration for webhook-based integrations.

### Step 3: Add Security Key to AnyTrack

1. Return to AnyTrack integration settings
2. Paste your security key in the designated field
3. Click **Save**

## Validate Your Setup

### Check Link Tracking

Your affiliate links need proper tracking data tags. AnyTrack handles this automatically through **AutoTag**.

**AutoTag Methods:**

* **Automatic** (Recommended): AnyTrack finds and tags Twinspires Affiliates links automatically
* **AutoScan**: Works with redirect plugins by scanning and tagging embedded links
* **Manual**: Add tracking attributes using `data-tracking-group="incomeaccess"` or append `&c=--CLICK-ID--` to links

**Manual Link Example:**

```html
<a href="https://example.foo/goto/twinspires" data-tracking-group="incomeaccess">
  Twinspires Affiliates Offer
</a>
```

<HTMLBlock html={"\n<a href=\"https://example.foo/goto/twinspires\" data-tracking-group=\"incomeaccess\">Hover to see the AnyTrack <code>click_id</code> added automatically</a>\n"} />

**Verify Link Tagging:**
1. Add a Twinspires Affiliates affiliate link to your website
2. Hover over the link or inspect it in browser developer tools
3. Confirm the `c=[click_id]` parameter is added automatically

### Verify Conversions

Check your conversion tracking by either:

* Waiting for a natural conversion
* Creating a test conversion yourself

Then inspect the conversion logs in your AnyTrack dashboard to confirm data flows correctly.

**Sample Conversion Data:**

```json
{
  "netrevenue": "2.55",
  "affcustomid": "QfdSVGM3YZTZjwj0DElkDFYFBbgendJlTZ",
  "activedays": "1",
  "totalcommission": "1.02",
  "bannerid": "1195",
  "creativename": "Text_Link_WH_Sport",
  "clicks": "0"
}
```

## What to Expect After Setup

### Timeline

**Real-Time Tracking:**
- **Immediate:** Link clicks appear as OutboundClick events in AnyTrack (visible within seconds)
- **Real-time conversions:** Conversion data flows from the affiliate program to AnyTrack and then to your connected ad platforms in real-time
- **Validation timeframe:** Depending on your traffic volume, you can validate the integration within minutes to hours (not days)

> 📘 **Quick**
>
> For instant validation, connect <a href='/docs/ga4'>Google Analytics 4</a> and use the [Debug View](https://support.google.com/analytics/answer/7201382) to see events flowing in real-time as you test clicks and conversions.

### Where to Check
1. **Link tracking:** Use the <a href='/docs/anytrack-chrome-extension'>AnyTrack Pixel Helper</a> extension on your website
2. **Conversions:** Check the <a href='/docs/integration-event-log'>Conversion Event Log</a> in your AnyTrack dashboard
3. **Attribution:** View Attribution Reports in your dashboard
4. **Real-time validation:** Connect <a href='/docs/ga4'>Google Analytics 4</a> and use Debug View to see events in real-time

### If You Don't See Data
If conversions don't appear within a few hours of active traffic:
1. Review the <a href='/docs/integration-event-log'>Conversion Event Log</a> for errors
2. Verify the `c` parameter appears in your Twinspires Affiliates dashboard reports
3. Follow troubleshooting steps below

## Common Questions

<FaqAccordion
  title="Common Questions"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Can I import past conversions?",
      answer: "No. AnyTrack only tracks conversions that happen after a visitor clicks through your website with the tracking tag installed. Past conversions cannot be imported because they lack the required <code>click_id</code> to connect them to traffic sources."
    },
    {
      question: "Can I track direct linking campaigns?",
      answer: "Yes, but this requires a custom setup. Direct linking to Twinspires Affiliates offers (without a landing page) needs special configuration. See our <a href='/docs/deeplink'>direct linking guide</a> for details."
    },
    {
      question: "Can I use a different <code>subid</code> parameter?",
      answer: "No. The IncomeAccess platform expects the <code>c</code> parameter that AnyTrack provides. Using a different parameter will prevent conversions from being tracked back to the original click."
    },
    {
      question: "What if conversions don't have a <code>click_id</code>?",
      answer: "Conversions without a <code>click_id</code> cannot be tracked. The <code>click_id</code> connects the conversion back to the original website visit and traffic source. Without it, AnyTrack cannot attribute the conversion correctly. <a href='/docs/anytrack-click-id'>Learn more about click IDs</a>"
    }
  ]}
/>

## Troubleshooting

### Step 1: Verify Your Basic Setup

**Check Tracking Tag Installation**

1. Install the <a href='/docs/anytrack-chrome-extension'>AnyTrack Pixel Helper Chrome Extension</a>
2. Visit your website
3. Verify the extension icon turns blue (indicating AnyTrack tag is detected)
4. If the icon doesn't turn blue, <a href='/docs/install-anytrack-tag'>review tag installation</a>

**Verify Security Key is Valid**

1. Go to your AnyTrack integration settings for TwinSpires
2. Check for error messages in the integration status
3. If you see "Api key format is invalid" or similar errors:
   - Log into your TwinSpires affiliate dashboard
   - Generate a new security key
   - Update the security key in AnyTrack settings
   - Click **Save**

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

> 📘 **Security**
>
> - Set IP whitelist to `0.0.0.0/0` in your affiliate dashboard
> - Copy the complete key without extra spaces
> - Save in AnyTrack before testing

### Step 2: Not Getting Any Conversions?

**Check Your Integration Settings**

* [ ] Verify the integration is active in your TwinSpires affiliate dashboard
* [ ] Confirm you're using the correct AutoTag parameter (`c`)
* [ ] Check that your security key hasn't expired (if applicable)

**Check Your Link Tagging**

* [ ] Verify links aren't hidden behind JavaScript or double redirects
* [ ] Ensure links use standard `<a>` HTML elements
* [ ] Try adding the tracking group manually: `data-tracking-group="incomeaccess"`

### Step 3: Conversions Show Errors?

**Most Common Issue: Missing Click ID**
This happens when AutoTag couldn't add the `click_id` to your affiliate links.

**Solutions:**

* Check if links are behind JavaScript or complex redirects
* Verify links are in standard HTML format
* Manually add tracking group attributes to links
* Ensure your offers only get traffic from pages with the AnyTrack tag installed

**Conversions Not Validated?**

* [ ] Compare your integration settings with AnyTrack's pre-defined integration
* [ ] Copy the Event Reference from your Conversion Event Log and <a href='/docs/contact-support'>contact support</a>

> 📘 **Before**
>
> Check the <a href='/docs/integration-event-log'>Conversion Event Log</a> to identify specific errors. When contacting <a href='/docs/contact-support'>support</a>, include:
> - Event Reference ID from any errors
> - Screenshot of your link's HTML code
> - Screenshot of integration error (if any)
> - Your TwinSpires affiliate ID

- [FB Ads Affiliate Marketing](/docs/how-to-do-affiliate-marketing-on-facebook-ads)
- [Google Ads Affiliate Marketing](/docs/how-to-do-affiliate-marketing-on-google-ads)
- [Track Forms and Pass Click IDs](/docs/how-to-track-form-submission-and-pass-anytrack-clickid-to-an-affiliate-offer-link)

## Related Resources

### Essential Setup Guides
- <a href='/docs/install-anytrack-tag'>Install AnyTrack Tag</a> - Set up tracking on your website
- <a href='/docs/autotag'>AutoTag Explained</a> - Understand automatic link tagging
- <a href='/docs/tgid'>Tracking Groups (TGID)</a> - Learn about tracking group identifiers
- <a href='/docs/anytrack-click-id'>Click ID Overview</a> - Understand unique click identifiers

### IncomeAccess Platform
- <a href='/docs/incomeaccess'>IncomeAccess Integration Overview</a> - Platform explanation and all available programs
- [Request New Integration](https://news.anytrack.io/ideas/en) - Suggest a program

### Monitoring & Troubleshooting
- <a href='/docs/integration-event-log'>Conversion Event Log</a> - Monitor conversion data
- <a href='/docs/anytrack-chrome-extension'>AnyTrack Pixel Helper</a> - Verify tracking installation
- <a href='/docs/troubleshooting-integrations'>Integration Troubleshooting</a> - Common issues
- <a href='/docs/contact-support'>Contact Support</a> - Get help from our team

### Advanced Setups
- <a href='/docs/deeplink'>Direct Linking Setup</a> - Track direct-to-offer campaigns
- <a href='/docs/cross-domain-tracking'>Cross-Domain Tracking</a> - Track across multiple domains
