How to save other properties after contact created

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?

Hi, check this:


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

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?

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

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.

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.

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

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

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

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

what can be instead of send and preview ?