1<?php23add_hook('ClientAreaPage', 1, function($vars) {45if (!empty($_GET['gclid'])) {6$gclid = trim((string)$_GET['gclid']);78$_SESSION['gclid'] = $gclid;910// keep long enough to survive “trial then later login”11setcookie('gclid', $gclid, time() + (7 * 86400), "/");12}13});