Alpha Insights uses an attribution window to decide how long to remember where a visitor came from and which page they first landed on. This guide explains what the setting controls, what data is stored (referral URL and landing page), and how it affects your reports and order attribution.
The attribution window is configured in Alpha Insights → Settings → General Settings, under the section Alpha Analytics & Event Tracking.
Setting name: Attribution Window Timeout (days)
Options: 1, 2, 3, 4, 5, 6, 7, 14, or 30 days. The default is 3 days if the setting is not saved.
This value is used everywhere attribution is applied: cookies, session storage, and reporting. The frontend and backend stay in sync so the same number of days is used for storing and expiring attribution data.
The attribution window controls how long two pieces of data are kept for the visitor:
Both are stored when the visitor first hits your site (or when first detected). They are first-touch: once set, they are not updated on later page views. They simply expire after the attribution window (in days) from when they were first set.
Referral URL is stored in the cookie wpd_ai_referral_source and in server-side session (PHP/WooCommerce session) as a backup. It is used to work out the traffic source (e.g. Organic Search, Google Ads, Direct, Social).
Landing page is set by JavaScript on the first page load (document.location.href) and stored in the cookie wpd_ai_landing_page. It is not overwritten by later activity; it always represents the first page they landed on within the attribution period.
When the window expires, both values are cleared. After that, a later visit or purchase will no longer be tied to that original referrer or landing page unless the visitor comes again with a new referrer/landing (which will then get a new window).
Each stored session includes landing_page and referral_url (or equivalent). The traffic source (acquisition channel) is derived from the referral URL and any UTM or tracking parameters on the landing page. Reports that group by traffic source, acquisition channel, or landing page use this session data. If the attribution window is short, sessions that extend beyond the window no longer have a valid referral/landing and may be treated as direct or uncategorized once the data has expired.
When an order is placed, Alpha Insights copies the current referral source and landing page from the session/cookies onto the order (order meta _wpd_ai_referral_source and _wpd_ai_landing_page). So the order is attributed to whatever source and landing page were still within the attribution window at checkout.
So a longer window (e.g. 14 or 30 days) keeps “first touch” longer and attributes more orders to the original campaign or referrer. A shorter window (e.g. 1–3 days) attributes only orders that happen soon after the first visit; later returns may show as direct or a different source.
Changing the setting only affects new attribution (new cookies and new session data). Existing orders and already-stored sessions keep the referral and landing page they had when they were saved.
The attribution window is independent of session length. Sessions can expire or be extended based on activity and session timeout rules. Referral URL and landing page are stored and expired only by the attribution window (from the time they were first set), so they can outlast or underlast a given session depending on your settings. They are de-coupled from the session ID: if a session expires (e.g. 30 minutes of inactivity), the referral and landing page are not cleared and continue to expire only after the attribution window from when they were first set.
Internally, the setting is stored as days and converted to seconds for cookies and server-side expiry. The frontend (JavaScript) receives the same value in seconds so cookie expiry and reporting stay in sync.
You can override the attribution window programmatically with the filter wpd_attribution_timeout_seconds. The filter receives the computed value in seconds (from the saved days setting) and must return an integer (seconds). Example:
add_filter( 'wpd_attribution_timeout_seconds', function( $seconds ) {
return 14 * DAY_IN_SECONDS; // 14 days
}, 10 );
For more on how traffic source is determined from referral URL and UTM parameters, see Traffic Source Analysis and Tracking UTM Campaigns.