How to save UTM a label move to another page?

Hi guys, this question is a form

<form action="send.php" method="post">
 <input type="hidden" name="utm_source" value="<?php $utm_source = $_GET['utm_source']; echo $utm_source; ?>">
 <input type="hidden" name="utm_medium" value="<?php $utm_medium = $_GET['utm_medium']; echo $utm_medium; ?>">
 <input type="hidden" name="utm_campaign" value="<?php $utm_campaign = $_GET['utm_campaign']; echo $utm_campaign; ?>">
 <input type="hidden" name="utm_content" value="<?php $utm_content = $_GET['utm_content']; echo $utm_content; ?>">
 <input type="hidden" name="utm_term" value="<?php $utm_term = $_GET['utm_term']; echo $utm_term; ?>">
 <input type="text" required="required" name="name" class="form-control" placeholder="Name">
 <input type="text" id="phone" name="phone" class="form-control" placeholder="Phone">
 <button class="button" 
onclick="ym(34846055, 'reachGoal', 'zapisalis_na_test_drive'); ga ('send', 'event', 'form', 'send');" type="submit">request a test drive</button>

Is it the handler:
//Received mail data
 $utm_source = $_POST['utm_source'];
 $utm_medium = $_POST['utm_medium'];
 $utm_term = $_POST['utm_term'];
 $utm_content = $_POST['utm_content'];
 $utm_campaign = $_POST['utm_campaign'];

 //Here we specify what mailbox to send a letter
 $to = '';

 //Next is the subject and the message itself
 $subject = "Request from website";
 $message = "
 Email sent from my form<br />
 The user specifies:<br />Name: ".htmlspecialchars($name)."<br />
 Phone: ".htmlspecialchars($phone)."<br />
 utm_source = ".htmlspecialchars($utm_source)." <br />
 utm_medium = ".htmlspecialchars($utm_medium)." <br />
 utm_term = ".htmlspecialchars($utm_term)." <br />
 utm_campaign = ".htmlspecialchars($utm_campaign)." <br />
 utm_content = ".htmlspecialchars($utm_content);
 $headers = "From: <>\r\nContent-type: text/html; charset=utf8 \r\n";
 mail ($to, $subject, $message, $headers);

On the main mail come correct UTM tags. But if the user goes on the inside and out will send the form, it will already be tagged. How can they save?

If not difficult, the link to the Doc which will give an answer, and then we have with php is not really doing
April 3rd 20 at 17:24
2 answers
April 3rd 20 at 17:26
If you have a utm is configured only on the main page, you probably need (the crutch at your own risk) when you log on to the website to write it down utm data in a cookie/localstorage when sending to use it. BUT! Don't forget to clean up the data before the user leaving the website after submitting the form, but would not break his same statistics, for example, curves/the old/incorrect data
April 3rd 20 at 17:28
When the request to save utm-tags in session, if any. If not, take it from session.

Find more questions by tags PHPJavaScriptWeb Development