| @@ -404,9 +404,13 @@ | ||
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | $utmData = static::prepareUtmData($data); |
| 407 | 407 | if ($utmData) { |
| 408 | - $cart->utm_data = array_merge(is_array($cart->utm_data) ? $cart->utm_data : [], $utmData); | |
| 408 | + // Replaced, not merged. A cart row is reused across visits, so merging | |
| 409 | + // key by key accumulated a union of every touch that ever reached it and | |
| 410 | + // the column stopped describing any single one. The browser has already | |
| 411 | + // resolved which touch this is, so its block is the answer. | |
| 412 | + $cart->utm_data = $utmData; | |
| 409 | 413 | $cart->save(); |
| 410 | 414 | } |
| 411 | 415 | |
| 412 | 416 | return $cart; |