> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tagada.io/llms.txt
> Use this file to discover all available pages before exploring further.

# RedTrack

> Server-side conversion postback for RedTrack with first-party cookie support

# RedTrack

[RedTrack](https://redtrack.io) is a click-id-based ad attribution tracker with strong CRM integrations and a unique **first-party cookie** approach (`rtkclickid-store`) that survives Safari ITP better than most competitors.

***

## Setup

<Steps>
  <Step title="Find your RedTrack tracking domain">
    In RedTrack: **Tools → Tracking domains**. Copy your custom tracking domain (the one CNAMEd to `track.rdtk.io`).
  </Step>

  <Step title="Enable RedTrack in TagadaPay">
    Dashboard → **Settings → Integrations → RedTrack → Connect**. Paste the tracking domain (no `https://`), save.
  </Step>

  <Step title="Install the RedTrack Universal Tracking Script on your lander">
    This is what makes the first-party cookie magic work. Per RedTrack's [Universal Tracking Script docs](https://help.redtrack.io/universal-tracking-script), drop their `rtkcdp.js` snippet on every lander page.

    The script reads URL click parameters (`clickid`, `rtkclickid`, etc.), generates a fresh first-party `rtkclickid-store` cookie scoped to your domain, and ensures the click\_id is available on every subsequent page hit — including through redirects.

    TagadaPay's mapper captures both the URL parameters and the `rtkclickid-store` cookie at checkout creation, so attribution survives even if the customer navigates between several pages on your site before checking out.
  </Step>

  <Step title="Forward the click_id to checkout">
    The Universal Tracking Script handles this automatically when checkout is on the same domain as the lander. For cross-domain checkouts (the typical TagadaPay setup), append the click\_id manually:

    ```
    https://checkout.yourstore.com/checkout?rtkclickid={clickid}
    ```

    Use RedTrack's `{clickid}` token in your offer URL.
  </Step>

  <Step title="Test the conversion">
    Place a test order. The conversion should appear in RedTrack's **Reports → Campaigns** within \~60s.
  </Step>
</Steps>

***

## What TagadaPay Fires

Per [RedTrack's S2S conversion docs](https://help.redtrack.io/conversion-tracking-s2s-script-api):

```
https://{trackingDomain}/postback?clickid={clickId}&sum={payout}&type={conversionType}
```

**Parameter mapping:**

| RedTrack param | Source                                                              | Notes                                                                                                                         |
| -------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `clickid`      | Click\_id captured on lander or read from `rtkclickid-store` cookie | Required.                                                                                                                     |
| `sum`          | Order's paid amount in major units                                  | Optional override available.                                                                                                  |
| `type`         | Conversion type from integration form (default: `purchase`)         | RedTrack uses string types — `purchase`, `lead`, `signup`, etc. — defined in your account's **Conversion Tracking** settings. |

***

## How TagadaPay Identifies the Click

In priority order:

1. URL parameter `rtkclickid` (RedTrack's canonical name)
2. URL parameter `clickid`
3. URL parameter `click_id` (fallback)
4. Cookie `rtkclickid-store` ← **the canonical first-party cookie**, set by RedTrack's Universal Tracking Script
5. Cookie `_rtkclickid` (legacy fallback)

The `rtkclickid-store` cookie is the most resilient signal because it's a first-party cookie that persists through Safari ITP's 7-day cap on script-set first-party cookies (RedTrack's script refreshes it on every page load).

***

## Optional Settings

* **Conversion type** — sent as `type`. Defaults to `purchase`. Use `lead`, `signup`, `upsell`, etc. to map to your custom event names in RedTrack.
* **Fixed payout** — overrides the order amount if set.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="No clicks visible in RedTrack but conversions arriving">
    This is the classic "conversions without clicks" issue. It means the click\_id was captured at checkout but RedTrack has no record of the original click — usually because the lander wasn't behind a RedTrack tracking link. Verify your campaign's traffic source actually routes through RedTrack first.
  </Accordion>

  <Accordion title="Universal Tracking Script vs Direct Tracking">
    RedTrack offers two modes:

    * **Direct tracking** — visitor lands directly on your offer URL with `?rtkclickid=…`. Works for most setups. TagadaPay reads the URL param.
    * **Redirect tracking** — visitor goes through `track.yourdomain.com/click?...` first, RedTrack drops the cookie and 302s to your lander. The cookie is what TagadaPay reads.

    For best resilience, use both: traffic goes through RedTrack's redirect AND your lander has the Universal Tracking Script installed.
  </Accordion>

  <Accordion title="Type-mismatched conversions ('Wrong conversion type')">
    Make sure the **Conversion type** in TagadaPay matches one of the conversion types defined in RedTrack → **Settings → Conversion Tracking**. RedTrack rejects unknown types silently.
  </Accordion>
</AccordionGroup>

***

## References

* [RedTrack: Conversion tracking — S2S, script, API](https://help.redtrack.io/conversion-tracking-s2s-script-api)
* [RedTrack: Universal Tracking Script](https://help.redtrack.io/universal-tracking-script)
* [Tracking & Attribution overview](/developer-tools/tracking/overview)
