Skip to content
if ( isset($_GET['utm_source']) && trim($_GET['utm_source']) != '' ) {
$utm_source = trim($_GET['utm_source']);
setcookie('utm_source', $utm_source, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
if ( isset($_GET['utm_medium']) && trim($_GET['utm_medium']) != '' ) {
$utm_medium = trim($_GET['utm_medium']);
setcookie('utm_medium', $utm_medium, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
if ( isset($_GET['utm_campaign']) && trim($_GET['utm_campaign']) != '' ) {
$utm_campaign = trim($_GET['utm_campaign']);
setcookie('utm_campaign', $utm_campaign, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
if ( isset($_GET['utm_content']) && trim($_GET['utm_content']) != '' ) {
$utm_content = trim($_GET['utm_content']);
setcookie('utm_content', $utm_content, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
if ( isset($_GET['utm_term']) && trim($_GET['utm_term']) != '' ) {
$utm_term = trim($_GET['utm_term']);
setcookie('utm_term', $utm_term, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
if ( isset($_GET['utm_partner']) && trim($_GET['utm_partner']) != '' ) {
$utm_partner = trim($_GET['utm_partner']);
setcookie('utm_partner', $utm_partner, time() + 60 * 60 * 24 * 365); // срок действия ~ 1 год
}
?>
echo $_COOKIE['utm_source']; ?>
echo $_COOKIE['utm_medium']; ?>
echo $_COOKIE['utm_campaign']; ?>
echo $_COOKIE['utm_content']; ?>
echo $_COOKIE['utm_term']; ?>
echo $_COOKIE['utm_partner']; ?>