# Attribution Rules

> How Edesy call tracking credits a call to a website visit - exact match while the lease is live, grace match within the cooldown, repeat caller within 90 days, or unattributed - and which campaign fields each call carries.

Source: https://edesy.in/docs/call-tracking/pools/attribution-rules

When a tracking number rings, Edesy looks for the website visit that held that number and credits the call to it. Every call gets one of four match types, strongest first.

## Match types

| Match | Portal label | When it applies |
|---|---|---|
| `exact` | Exact | The number was leased to this visit when the call came in |
| `grace` | Grace | The visit's lease had just ended, within the pool's cooldown |
| `repeat_caller` | Repeat caller | No visit held the number, but the same caller number has an earlier attributed call to this pool in the last 90 days. The call is credited to that earlier visit |
| `none` | Unattributed | No visit and no earlier attributed call to credit |

The lookup runs when the call arrives and is time-boxed, so it never delays the call. If it cannot finish, the call is still connected and recorded as unattributed.

## What a call is credited with

An attributed call carries the visit's campaign context:

| Field | Source |
|---|---|
| `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content` | The visit's last touch |
| `gclid`, `fbclid` | The visit's click IDs |
| `site_host`, `landing_url`, `referrer` | Where the visit landed and came from |
| `first_touch` | The visitor's first recorded campaign touch in the last 90 days, if any |
| `is_first_call` | Whether this caller has called any number in the pool before |

`gbraid`, `wbraid` and `msclkid` are captured with the visit and count as paid traffic for the "paid traffic only" setting.

## First touch and last touch

The script keeps two touches per visitor:

- **Last touch** is the most recent visit with campaign parameters. On later pages without parameters it is reused for 30 minutes.
- **First touch** is the first campaign touch, kept for 90 days.

Reports group by the last touch. The first touch is available on each call, in the API and in the webhook.

## Tuning attribution

| You want | Change |
|---|---|
| Fewer unattributed late calls | Longer lease or cooldown (needs more numbers) |
| Fewer numbers | Shorter lease or cooldown, or paid traffic only |
| No shared credit when the pool is full | Keep **Show the normal number** as the exhaustion setting |

See [Number Pools](https://edesy.in/docs/call-tracking/pools/number-pools) for how lease and cooldown affect pool size.

## FAQ

**Why is a call marked Grace instead of Exact?**
The visitor's lease had ended, but the call came within the cooldown, before the number was given to anyone else. It is still credited to that visit.

**Can a repeat caller be credited to the wrong campaign?**
Repeat-caller matches use the caller's last attributed call to the pool. If they found you again through a different campaign without a live lease, the credit goes to the earlier visit. Filter by match type in reports to see these calls separately.

**Are calls to my normal number tracked?**
No. Only calls to numbers in a pool are matched to visits.
