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

# First-Click vs Last-Click

> Understand how cms_rf cookie attribution works, the difference between first-click and last-click models, and which one is right for your tracking strategy.

## What is Attribution?

When a user visits your site, they rarely come from a single source. They might discover your product through a Google Ad, leave, come back from an email campaign, and finally convert through a direct visit. **Attribution** is how you decide which of those touchpoints gets the credit for the conversion.

The CMS script’s `cms_rf` parameter-based cookie system is a lightweight, first-party implementation of this concept no third-party dependencies, no cross-domain complexity, just clean URL-parameter tracking stored directly in the browser.

<Note>
  The CMS script uses <strong>last-click attribution</strong> by default.
</Note>

## How the `cms_rf` Cookie System Works

On page load, the CMS script checks the URL for the `cms_rf` parameter. If present, it runs attribution logic that either sets the cookie for the first time or updates an existing value.

<Steps>
  <Step title="User arrives on site">
    The user clicks a link with `?cms_rf=google_cpc` appended to the URL (e.g., from a paid ad, email, or affiliate link).
  </Step>

  <Step title="Script detects cms_rf">
    The CMS script reads the `cms_rf` value from url on page load.
  </Step>

  <Step title="Cookie logic runs">
    Based on the attribution model, the script either **sets** the cookie (if not set) or **overwrites** it (if already set).
  </Step>

  <Step title="Cookie is sent with conversion">
    When the user completes a conversion event, the `cms_rf` cookie value is read and passed along to your analytics or CRM system.
  </Step>
</Steps>

<Note>
  The `cms_rf` cookie is a **first-party cookie**, which means it lives in the user's browser under your own domain. This makes it more reliable than third-party tracking pixels in an era of increasing browser privacy restrictions (Safari ITP, Firefox ETP, etc.).
</Note>

## First-Click Attribution

In **first-click**, the first touchpoint that introduced the user is retained. Once the `cms_rf` cookie is set, it is **not overwritten** even if the user returns later with a different `cms_rf` value.

### Example scenario

| Visit | URL Parameter             | Cookie Value (First-Click) |
| ----- | ------------------------- | -------------------------- |
| 1st   | `cms_rf=google_cpc`       | `google_cpc` ✅ Set         |
| 2nd   | `cms_rf=email_newsletter` | `google_cpc` 🔒 Locked     |
| 3rd   | `cms_rf=referral_partner` | `google_cpc` 🔒 Locked     |

<Tip>
  First-click is most useful when the initial discovery channel is the signal you want to report on (often longer consideration cycles like SaaS, B2B, or high-ticket products).
</Tip>

### When to use First-Click

* You want to understand what **drives awareness** and top-of-funnel traffic.
* You want credit to remain with the first recorded source across return visits.
* Your customer journey typically spans multiple sessions before conversion.

## Last-Click Attribution

In **last-click**, the most recent touchpoint is retained. Every time a user arrives with a new `cms_rf` value, the cookie is overwritten. So the stored value reflects the last channel seen before converting.

### Example scenario

| Visit | URL Parameter             | Cookie Value (Last-Click)     |
| ----- | ------------------------- | ----------------------------- |
| 1st   | `cms_rf=google_cpc`       | `google_cpc` ✅ Set            |
| 2nd   | `cms_rf=email_newsletter` | `email_newsletter` 🔄 Updated |
| 3rd   | `cms_rf=referral_partner` | `referral_partner` 🔄 Updated |

<Tip>
  Last-click is most useful when the final converting touchpoint is the signal you want to report on (often performance and conversion-focused workflows).
</Tip>

### When to use Last-Click

* You want to know what **closes deals** and drives final conversions.
* You want the attribution value to reflect the most recent recorded source before conversion.
* Your customer journey is short and straightforward.

## Which Model is Better?

There’s no universally “better” model. Each answers a different question.

<Tabs>
  <Tab title="First-Click">
    * Your primary marketing goal is **brand discovery and awareness**
    * You run significant spend on top-of-funnel channels (paid search, content, social) and need to justify ROI
    * Your conversion cycle is **30+ days**
    * You're trying to understand what channel to invest in to grow your audience
  </Tab>

  <Tab title="Last-Click">
    * Your primary goal is **conversion optimization**
    * You run retargeting, promotional email, or affiliate campaigns that directly push users to convert
    * Your conversion cycle is **long**
    * You're a performance marketer who needs to optimize channel spend by conversion volume
  </Tab>
</Tabs>

## Summary

| Type                       | First-Click           | Last-Click           |
| -------------------------- | --------------------- | -------------------- |
| **Cookie set**             | Once only             | Every new `cms_rf`   |
| **Cookie overwritten**     | Never                 | Always               |
| **Credits**                | Original source       | Most recent source   |
| **Best signal**            | Awareness & discovery | Conversion & closing |
| **Cookie expiry strategy** | Longer (60–90 days)   | Longer (60–90 days)  |
| **Complexity**             | Low                   | Low                  |

Both models are simple, privacy-friendly, and effective when used for the right purpose. The most important thing is to **choose deliberately** based on your analytics goals and document which model is active so your team interprets the data correctly.
