Save UTM Parameters to WooCommerce Orders: First and Last Touch
WooCommerce 8.5 introduced native Order Attribution Tracking, but it only captures last-click data within a single session. To know which campaigns actually drive sales, you need both first-touch (what originally brought the customer) and last-touch (what converted them) attribution stored directly on each order. This requires capturing UTM parameters on arrival, persisting them across sessions, and attaching them as order metadata at checkout. Server-side solutions handle this automatically, bypassing cookie expiration and session limits that break native tracking.