用于将UTM发送到iFrame的PHP代码的Javascript翻译

I used PHP code to send UTM code to an iframe. But how to translate it to javascript code?

<?php 
  $utm_source = $_GET['utm_source']; 
  $utm_medium = $_GET['utm_medium']; 
  $utm_campaign = $_GET['utm_campaign']; 
?> 
<iframe id="typeform-full" width="100%" height="100%" 
 frameborder="0" src="artsenzondergrenzen.typeform.com/to/rdm3VJ?utm_source=<?php echo $utm_source; ?>&utm_medium=<?php echo $utm_medium; ?>&utm_campaign=<?php echo $utm_campaign; ?>"></iframe> 
  <script type="text/javascript" src="embed.typeform.com/embed.js"></script>

Thank you for your reply. I am new and will put the code in the question itself next time, thanks for helping me with that. My question is that i have a perfectly working php code for adding utm parameters from the host URL to the iFrame URL. That's an question i've seen many times on Stack. So should be helpfull for other users aswell. The problem i have i want to use it on a page that only allows html files and not php. That is why i want to translate is to javascript code. But the code below is not working, any ideas?

<script language="JavaScript">

var nl = getNewLine()

function getNewLine() {
    var agent = navigator.userAgent

    if (agent.indexOf("Win") >= 0)
        return "
"
    else
        if (agent.indexOf("Mac") >= 0)
            return ""

    return ""

}

pagecode = '<?php'+nl+
    '$utm_source = $_GET[\'utm_source\'];'+nl+
    '$utm_medium = $_GET[\'utm_medium\'];'+nl+
    '$utm_campaign = $_GET[\'utm_campaign\'];'+nl+
    '?>'+nl+nl+
    '<iframe id="typeform-full" width="100%" height="100%" frameborder="0" src="https://artsenzondergrenzen.typeform.com/to/rdm3VJ?utm_source='<?php echo $utm_source; ?>'&utm_medium='<?php echo $utm_medium; ?>'&utm_campaign='<?php echo $utm_campaign; ?>'"></iframe> '+nl+nl+
    '<scr'+'ipt type="text/javascript" src="https://embed.typeform.com/embed.js"></scr'+'ipt>'

document.write(pagecode);

</script>

</div>