# How to pass UTM params through Form

**URL:** <https://forum.mautic.org/t/how-to-pass-utm-params-through-form/12641>\
**Category:** Product Support\
**Created:** [February 7, 2020, 9:20am UTC](https://forum.mautic.org/t/how-to-pass-utm-params-through-form/12641 "2020-02-07T09:20:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obrubov](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/obrubov/32/1560_2.png) [@obrubov](https://forum.mautic.org/u/obrubov)\
**Post date:** [February 7, 2020, 9:20am UTC](https://forum.mautic.org/t/how-to-pass-utm-params-through-form/12641/1 "2020-02-07T09:20:56Z")

</div>

My Mautic version is: v2.15.3  
My PHP version is: 7.2

My problem is:  
I have the Form in my opt-in page. Submit Form action is redirect to page2. I need to pass UTM params when this redirect occurs. How is it possible?

For example user land on opt-in page/?utm\_source=something\_dynamic, and then fills and submit the Form, i want him to redirect to page2/?utm\_source=something\_dynamic.  
When i used getresponse before Mautic, i made this by adding php code to link which catch UTM parameter, like this:

```
<form...

  <input type="hidden" name="thankyou_url" value="https://mydomain.com/page2/?utm_source=<?=@$_GET['utm_source']?>"/>

...
</form>

```

Form action is configuring in Mautic inteface, and when i paste this link “[https://mydomain.com/page2/?utm\_source=](https://mydomain.com/page2/?utm_source=)\<?=@$\_GET['utm\_source']?\>” in Redirect URL and press save, it didn’t save php code (screen: [http://prntscr.com/qyuft2](http://prntscr.com/qyuft2))

I also tried to choose “Remain at Form” in Mautic, and then add this code manually to my Form:

` <input type="hidden" name="thankyou_url" value="https://mydomain.com/page2/?utm_source=<?=@$_GET['utm_source']?>"/>`

But redirect didn’t working that way.

Please help
