# How to tie entered data from a form to a user?

**URL:** <https://forum.mautic.org/t/how-to-tie-entered-data-from-a-form-to-a-user/13278>\
**Category:** Product Support\
**Created:** [March 7, 2020, 4:12pm UTC](https://forum.mautic.org/t/how-to-tie-entered-data-from-a-form-to-a-user/13278 "2020-03-07T16:12:49Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![big\_smile](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/big_smile/32/694_2.png) [@big\_smile](https://forum.mautic.org/u/big_smile)\
**Post date:** [March 13, 2020, 1:45pm UTC](https://forum.mautic.org/t/how-to-tie-entered-data-from-a-form-to-a-user/13278/11 "2020-03-13T13:45:25Z")

</div>

@renzof  
Thanks you so much for your help! This has been a tricky problem, so I greatly appreciate your solution.

This is the code that I put on my HTML landing page:

```
<script>
    (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
        w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
        m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
    })(window,document,'script','http://newsletter.smile.ws/mtc.js','mt');
    mt('send', 'pageview', {'tags':'sunshine-book'});

</script>

```

To test it out, I submitted a test contact on my HTML landing page.

When I log-into Mautic, and go to the contact page for the contact, the tag field is blank:

![Screen Shot 2020-03-13 at 13.42.24](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/79d6b9033915bd5eb44ae44a86c0b95cb5cafc2a.jpeg)

However, the tag does appear as an option in the tag menu:  
 ![Screen Shot 2020-03-13 at 13.43.25](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/649cb151d59df0afe4f5bfd83b34a9c628ba8d1c.jpeg)

How can I make it so the tag field is automatically filled with the tag?

On the [tracking API page](https://www.mautic.org/docs/en/contacts/contact_monitoring.html?_ga=2.19857080.1872546116.1584098451-1039627477.1583139319) you linked to, it says the following:

> The contact’s tags can be changed by using the `tags` query parameter. Multiple tags can be separated by comma. To remove a tag, prefix it with a dash (minus sign).
> 
> For example, `mtracking.gif?tags=ProductA,-ProductB` would add the ProductA tag to the contact and remove ProductB.

However, where would I put the `mtracking.gif?tags=ProductA,-ProductB` code? Do I need to set up a tracking pixel or can it be done via Javascript? Thanks!

---

_[View the full topic](https://forum.mautic.org/t/how-to-tie-entered-data-from-a-form-to-a-user/13278)._
