Attribution Window
How the 30-day last-click attribution model determines which publisher earns commission on a sale.
Drapier uses a 30-day last-click attribution model. This page explains what that means and how edge cases are handled.
How it works
When a consumer clicks your tracking link, a 30-day clock starts. If the consumer purchases within those 30 days, you earn a commission. If they don't purchase within 30 days, the click expires and no commission is earned — even if they purchase on day 31.
timeline
title Attribution Window Example
Day 0 : Consumer clicks your tracking link
Day 0 : Click ID stored in browser (expires in 30 days)
Day 1-29 : Purchase within this window → commission earned
Day 30 : Click expires
Day 31+ : Purchase → no commissionThe window is enforced on both the server and the browser. Click records expire automatically after 30 days. The browser cookie also has a 30-day expiry, and the attribution script ignores any stored click IDs older than 30 days.
Last-click model
"Last click" means that if a consumer clicks tracking links from multiple publishers before purchasing, only the most recent click gets credit.
Example: multiple publisher clicks
| Time | Event |
|---|---|
| March 1 | Consumer clicks Publisher A's link |
| March 8 | Consumer clicks Publisher B's link |
| March 15 | Consumer purchases |
Result: Publisher B earns the commission because their click was the most recent before the purchase.
Each new click from any publisher overwrites the previous click ID stored in the consumer's browser. There is no split attribution or multi-touch credit.
Edge cases
Consumer clears cookies
If the consumer clears their cookies but localStorage is intact, the click ID is recovered from localStorage on the next page load and the cookie is re-created. Attribution continues to work.
If both cookies and localStorage are cleared, the click ID is lost and no attribution is possible for that consumer.
Cross-device purchases
Attribution tracks clicks per browser/device. If a consumer clicks on their phone but purchases on their laptop, no attribution occurs because the click ID is not present on the purchasing device.
Direct traffic
If a consumer navigates directly to a storefront (typing the URL, using a bookmark, or clicking an untracked link), no click ID is present. When they purchase, no publisher is credited.
Multiple items in one order
All items in an order are attributed to the same click. If a consumer clicks your link to a specific product but adds other items to their cart, you earn commission on every item in the order.
Click on product A, purchase product B
Attribution is at the order level, not the product level. If a consumer clicks a link to Product A but purchases Product B instead (in the same session on the same storefront), the purchase is still attributed to you.
Summary
| Parameter | Value |
|---|---|
| Attribution model | Last click |
| Attribution window | 30 days |
| Multi-touch credit | No — only the last click earns commission |
| Cross-device | Not supported — click and purchase must share a browser |
| Scope | Order-level — all items in the order are attributed to the same click |