The attribution window (also called cookie duration) is how long a visitor has, after clicking an affiliate link, to sign up or buy and still credit the affiliate. The window ends at signup: once a referred visitor becomes a lead or customer inside the window, their later payments keep crediting the affiliate. This guide is for merchants and covers where to set the window per campaign, the default values, how first-click and last-click campaigns restart the window, and how to choose a length.
What the attribution window is
When a visitor clicks an affiliate link:
- AffiliateBase creates a referral and sets a cookie that expires when the referral does.
- If the visitor signs up (becomes a lead) or purchases within the window, the affiliate gets credit.
- If the visitor signs up inside the window and pays later, the affiliate still gets credit, even after the window has expired.
- If the visitor neither signs up nor purchases before the window expires, there is no attribution.
A visitor counts as a lead when the tracking script’s identify call records their email. See Affiliate Tracking and Attribution Reference.
Example
With a 60-day window:
- Day 1: Visitor clicks affiliate link
- Day 45: Visitor returns and purchases -> Affiliate credited
- Day 75: Visitor returns and purchases without having signed up -> No credit (window expired)
Free trial or freemium example with the same 60-day window:
- Day 1: Visitor clicks affiliate link
- Day 10: Visitor creates an account (tracked as a lead)
- Day 90: Visitor upgrades to a paid plan -> Affiliate credited, because the signup happened inside the window
Default setting
The default referral window is 60 days for campaigns created in Setup or through the REST API. The New campaign form pre-fills 90 days; change the value before you save if you want a different window. You can change the window per campaign at any time. The minimum is 1 day.
Changing the window affects clicks recorded afterward. A referral keeps the expiry date it was given at its most recent click.
Set the attribution window
Per campaign
- Go to Campaigns.
- Open the campaign’s actions menu and choose Edit campaign.
- Set Days before referrals expire.
- Choose Save changes.
During Setup, the same field is labeled Referral window.
Common windows
| Window | Best For |
|---|---|
| 7 days | Impulse purchases, low-cost products |
| 30 days | Shorter SaaS or ecommerce evaluation |
| 60 days | Standard default and considered purchases |
| 90 days | High-ticket items, enterprise sales |
| 180 days | Very long sales cycles |
Choose your window
Consider your sales cycle
How long do your customers take to decide?
- Same-day purchases: 7-14 days is enough
- Week-long consideration: 30 days is standard
- Month-long evaluation: 60-90 days fits
- Enterprise deals: 90-180 days may be needed
Consider affiliate expectations
Affiliates prefer longer windows because they:
- Give more time for conversions
- Raise earning potential
- Reflect how people really buy
But a window that is too long can:
- Credit affiliates for sales they didn’t drive
- Make tracking harder to reason about
- Conflict with your other marketing
Industry benchmarks
| Industry | Typical Window |
|---|---|
| Consumer SaaS | 30 days |
| B2B SaaS | 60-90 days |
| E-commerce | 14-30 days |
| Courses/Education | 30-60 days |
| Enterprise | 90-180 days |
How the window affects referrals
During the window
While the window is open:
- The referral is “active”
- New conversions are attributed to the affiliate
- Return visits keep the attribution
After the window expires
When the window expires:
- Visitors who never signed up or purchased are no longer attributed
- Leads who signed up inside the window still credit the affiliate when they pay
- Customers who already paid keep crediting the affiliate on renewals, subject to your campaign’s recurring commission settings, unless the affiliate has since been rejected, disabled, banned, or archived
- Existing conversions and commissions are unaffected
A referral’s first commission requires the affiliate to be pending, active, or suspicious when the payment arrives. Rejecting, disabling, banning, or archiving an affiliate stops their future commissions, including renewals. While an affiliate is suspicious, AffiliateBase records their commissions but holds them for review until you approve the affiliate or review each commission.
New clicks and the attribution model
How new clicks behave depends on the campaign’s attribution model:
- Last click: the latest eligible click wins and starts a new referral window.
- First click: the first eligible click keeps ownership until that referral expires or is deactivated.
In either model, a purchase does not reset the referral window. Opening the same affiliate link again restarts it; a return visit without the link does not.
Multiple clicks
Last-click example
AffiliateBase campaigns default to last-click attribution:
Day 1: Click Affiliate A -> 60-day window starts
Day 10: Click Affiliate B -> new 60-day window starts
Day 20: Purchase -> Affiliate B creditedIf the campaign uses first-click attribution, Affiliate A keeps credit in the same example until that referral expires or is deactivated.
Commission due date
The commission due date is a separate setting from the attribution window:
- Attribution window: how long after the click a visitor can sign up or buy and credit the affiliate
- Commission due date: when the commission becomes payable, set in Days until commissions are due on the campaign (Commission delay during Setup)
You configure them separately. For example:
- 60-day attribution window
- Commission due 30 days after purchase
A customer can convert inside the referral window, and the resulting commission can still wait out that delay before it becomes payable.
Impact on affiliate earnings
Longer windows
Pros:
- More conversions attributed
- Happier affiliates
- Reflects real customer journeys
Cons:
- Less accurate attribution
- May credit affiliates for organic conversions
- Harder to measure affiliate effectiveness
Shorter windows
Pros:
- More accurate attribution
- Clearer ROI measurement
- Less risk of over-attribution
Cons:
- Fewer credited conversions
- Affiliates may prefer competitors
- May miss legitimate referrals
Test window settings
A/B test
- Create two similar campaigns
- Set different windows (for example 30 vs 60 days)
- Assign similar affiliates to each
- Compare conversion rates and affiliate satisfaction
Metrics to watch
- Conversion rate within the window
- Average time to conversion
- Affiliate feedback
- Attribution accuracy
Best practices
Be transparent
Tell affiliates:
- The exact window length
- How the window is calculated
- What happens when it expires
Be consistent
Apply the same rules to every affiliate in a campaign.
Review regularly
Check your data:
- What % convert within 7 days?
- What % convert between 7-30 days?
- What % convert after 30 days?
Adjust the window to match what customers do.
Match your sales cycle
If 90% of sales happen within 14 days, a 30-day window is probably enough. If 40% happen between days 15-30, consider a longer window.
Technical details
Cookie expiration
The tracking cookie and the referral expire one window length after the most recent affiliate-link click, not at the end of that day. Each new click restarts the window:
Click: January 1 at 10:15 UTC
Window: 60 days
Cookie and referral expire: March 2 at 10:15 UTCIn a first-click campaign, a later click on another affiliate’s link in the same campaign also restarts the window, but the credit stays with the original affiliate.
Time zones
Expiration uses server time (UTC) for every referral.
Referral expiration and freeze
An expired referral that never became a lead cannot receive new conversions. A referral that became a lead or checkout conversion before it expired stays attributable for its payments. Frozen or deactivated referrals cannot advance to lead or conversion. Historical data is preserved.
Troubleshooting
Conversion not credited
If a conversion wasn’t attributed:
- Check when the original click happened
- Check whether the visitor signed up (became a lead) before the window expired; if so, a later payment should still be credited
- Otherwise, verify the payment happened before the window expired
- Check for newer affiliate clicks
- Check that the affiliate was pending, active, or suspicious (held for review) when the first payment arrived, and hasn’t since been rejected, disabled, banned, or archived
- Review the attribution priority rules in How Affiliate Attribution Works
Window seems wrong
- Verify the campaign’s Days before referrals expire value.
- Check which campaign the affiliate’s link belongs to.
- Remember that a referral keeps the expiry it was given at its latest click, so a changed campaign setting applies only to later clicks.
- Test with a known click date.
Next steps
- Learn how attribution works
- Configure Stripe conversion mapping
- Set up campaign reward settings