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 settings control, what data is stored (referral URL and landing page), and how that affects reports and order attribution.
Attribution is configured in Alpha Insights → Settings → General Settings, under Alpha Analytics & Event Tracking.
Options: Session Only, or 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: browser storage, cookies (when written), session records, and reporting. The frontend and backend stay in sync so the same duration is used for storing and expiring attribution data.
Default: True.
When a returning visitor starts a new session with UTM tags or click IDs (gclid, gbraid, fbclid, msclkid, utm_source, google_cid, meta_cid, and similar), replace the stored landing page and referral with this visit. Leave this False to keep first-touch attribution for the rest of the window.
Session Only still resets attribution on every new session, whether or not the URL has campaign parameters.
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 use first-touch attribution within the window: once set, they are not updated on later page views in the same session, and they are not updated on later sessions unless one of the reset rules below applies. They expire after the attribution window from when they were first set (or at session end if you chose Session Only).
When attribution resets:
Where values are stored: the analytics client writes them to localStorage first (wpd_ai_v2_landing_page, wpd_ai_v2_referral_source, plus timestamps). Cookies wpd_ai_landing_page and wpd_ai_referral_source are written on cart and checkout in Checkout Only mode, or on first visit in Immediate mode. See Cache-Safe Event Tracking.
Referral URL is used to work out the traffic source (for example Organic Search, Google Ads, Direct, Social). Same-site referrers are ignored and stored as empty.
Landing page is set by JavaScript from document.location.href. It always represents the first page of the current attribution period, unless a reset rule above overwrites it.
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 session storage 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.
A longer window (for example 14 or 30 days) keeps first-touch longer and attributes more orders to the original campaign or referrer — unless a later UTM visit overrides it. A shorter window or Session Only attributes only the current visit (or visits that happen soon after the first touch).
Changing the setting only affects new attribution (new browser storage 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, except when you choose Session Only. Sessions expire after 30 minutes of inactivity by default (filterable). Referral URL and landing page can outlast a given session when you use a multi-day window. They are de-coupled from the session ID: if a session expires, the referral and landing page stay until the window expires, unless Override Attribution on New UTM Visit is True and the returning visit includes campaign parameters.
Internally, the setting is stored as days (or 0 for Session Only) and converted to seconds for cookies and browser expiry. The frontend JavaScript receives the same value in seconds so storage 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, or the session timeout when Session Only is selected) and must return an integer (seconds). Example:
add_filter( 'wpd_attribution_timeout_seconds', function( $seconds ) {
return 14 * DAY_IN_SECONDS; // 14 days
}, 10 );
Override the UTM last-touch behaviour with wpd_ai_override_attribution_on_new_utm:
add_filter( 'wpd_ai_override_attribution_on_new_utm', '__return_false' );
For more on how traffic source is determined from referral URL and UTM parameters, see Traffic Source Analysis and Tracking UTM Campaigns.