PHP
- 1 ответ
- 0 вопросов
1
Вклад в тег
if(isset($_GET["utm_source"])) setcookie("utm_source",$_GET["utm_source"],time()+3600*24*30,"/");
if(isset($_GET["utm_medium"])) setcookie("utm_medium",$_GET["utm_medium"],time()+3600*24*30,"/");
if(isset($_GET["utm_campaign"])) setcookie("utm_campaign",$_GET["utm_campaign"],time()+3600*24*30,"/");
if(isset($_GET["utm_content"])) setcookie("utm_content",$_GET["utm_content"],time()+3600*24*30,"/");
if(isset($_GET["utm_term"])) setcookie("utm_term",$_GET["utm_term"],time()+3600*24*30,"/");
<input name="utm-source" type="hidden" value="<?=$_COOKIE['utm_source']?>">
<input name="utm-medium" type="hidden" value="<?=$_COOKIE['utm_medium']?>">
<input name="utm-compaign" type="hidden" value="<?=$_COOKIE['utm_compaign']?>">
<input name="utm-content" type="hidden" value="<?=$_COOKIE['utm_content']?>">
<input name="utm-term" type="hidden" value="<?=$_COOKIE['utm_term']?>">
'UTM_SOURCE' => $_POST['utm-source'],
'UTM_MEDIUM' => $_POST['utm-medium'],
'UTM_CAMPAIGN' => $_POST['utm-campaign'],
'UTM_CONTENT' => $_POST['utm-content'],
'UTM_TERM' => $_POST['utm-term'],