# How to save other properties after contact created

**URL:** <https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165>\
**Category:** General Discussion\
**Tags:** community, development\
**Created:** [November 26, 2020, 12:03pm UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165 "2020-11-26T12:03:49Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [November 26, 2020, 12:03pm UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/1 "2020-11-26T12:03:49Z")

</div>

I am getting anonymous contacts after adding the script.

> ```
> <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','https://mautic.bumbl.it/index.php/mtc.js','mt');
> 
> mt('send', 'pageview');
> </script>
> 
> ```

How can I save properties of those anonymous users?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 26, 2020, 9:46pm UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/2 "2020-11-26T21:46:27Z")

</div>

Hi, check this:

> **[Tracking Visitor Data by Smart URL](https://www.mautic.org/blog/developer/tracking-visitor-data-by-smart-url)**
>
> Have you ever wondered if you could track more than just visits via the Mautic tracking script?

  
Also: make sure the edited values are updatable by the script. This is a setting in custom fields.  
Good luck!

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [November 27, 2020, 4:38am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/3 "2020-11-27T04:38:36Z")

</div>

here, I have to make changes in the script. isn’t there a way I can simply call the mt function along with the other parameters and it gives me the result.  
I also checked forms. is that also a way?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 27, 2020, 5:51am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/4 "2020-11-27T05:51:15Z")

</div>

The above mentioned script just does that: saves properties to contacts.  
If I misunderstood you, plz rephrase the question 🙂

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [November 27, 2020, 11:20am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/5 "2020-11-27T11:20:03Z")

</div>

I get it now, so basically, I will be using only  
`> mt('send', 'pageview');`

and later on, whenever I get the email, I can call  
`mt('send', 'pageview', {email: email});`  
where email has the email entered by user, and it should be working that way.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 27, 2020, 11:36am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/6 "2020-11-27T11:36:10Z")

</div>

Well, if you asking from the process point of view, than yes.

From the programming point of view - you should pass the email value in that script. This email value you probably captured somewhere already or you can use as in the tutorial where the author reads it out from the email variable passed in the URL. But you can also just add it via PHP - it’s your choice.

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [November 27, 2020, 2:40pm UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/7 "2020-11-27T14:40:36Z")

</div>

no, i don’t have email already. I first want to track the user anonymously, and later i might or might not get the email. so first i added the normal script, and later whenever I get the email, I ran mt(‘send’, ‘pageview’, {email: email});  
and suppose, I don’t get the email, I have normal script. thing is i will get email later in time  
It solves my purpose tho.  
Only a small question, there is an option to create forms and work with them, or I can simply run this mt(‘send’, ‘pageview’, {email: email… more such properties});  
which is used when? as in form, i can take all the fields and send it via this mt function

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 27, 2020, 3:26pm UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/8 "2020-11-27T15:26:28Z")

</div>

If the contact submits a form with an email, all previous activity will be merged and this person will turn into a known contact.

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [December 1, 2020, 8:27am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/9 "2020-12-01T08:27:25Z")

</div>

can i get a list of all mt() parameters ?  
the only one I know is mt(“send”, “pageview”, {…properties})  
but this sends the pageevnt twice  
[link to another similar question](https://forum.mautic.org/t/where-is-the-list-of-mt-send-events/9511)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 2, 2020, 7:28am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/10 "2020-12-02T07:28:13Z")

</div>

You can use any field alias I believe. Not sure what else, only used those.

---

<div class="post-metadata">

**Author:** ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)\
**Post date:** [December 2, 2020, 9:56am UTC](https://forum.mautic.org/t/how-to-save-other-properties-after-contact-created/17165/11 "2020-12-02T09:56:22Z")

</div>

what can be instead of send and preview ?
