# mt('send'.. on button click

**URL:** <https://forum.mautic.org/t/mt-send-on-button-click/4319>\
**Category:** Product Support\
**Created:** [June 7, 2016, 8:53am UTC](https://forum.mautic.org/t/mt-send-on-button-click/4319 "2016-06-07T08:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mihai\_Tudor](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Mihai\_Tudor](https://forum.mautic.org/u/Mihai_Tudor)\
**Post date:** [June 7, 2016, 8:53am UTC](https://forum.mautic.org/t/mt-send-on-button-click/4319/1 "2016-06-07T08:53:33Z")

</div>

Hello,  
  
Is there any possibility to update a lead (mainly trigger javascript’s mt(‘send’… ) at a click of a button ?  
  
  
  
I’ve tried and looks like mt is not triggering on a jquery.click action.  
  
  
  
  
  
thanks,  
  
M

---

<div class="post-metadata">

**Author:** ![Mihai\_Tudor](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Mihai\_Tudor](https://forum.mautic.org/u/Mihai_Tudor)\
**Post date:** [June 7, 2016, 8:53am UTC](https://forum.mautic.org/t/mt-send-on-button-click/4319/2 "2016-06-07T08:53:33Z")

</div>

Hello,  
Is there any possibility to update a lead (mainly trigger javascript’s mt(‘send’… ) at a click of a button ?

I’ve tried and looks like mt is not triggering on a jquery.click action.

thanks,  
M

---

<div class="post-metadata">

**Author:** ![Mihai\_Tudor](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Mihai\_Tudor](https://forum.mautic.org/u/Mihai_Tudor)\
**Post date:** [June 7, 2016, 9:38am UTC](https://forum.mautic.org/t/mt-send-on-button-click/4319/3 "2016-06-07T09:38:38Z")

</div>

I think i’ve found a sollution:

Instead of calling mt() which is triggered only at MauticJS.documentReady, use this  
MauticJS.sendPageview([‘send’, ‘pageview’, {email: ‘emailyouwanttoupdate’, field2: ‘val’}]);

this will trigger the mtracking.gif pixel with the values you want to update and will match with the contact by the email addy which is unique
