Title: Adding script that will activate on form submit
Last modified: April 21, 2020

---

# Adding script that will activate on form submit

 *  [Edi](https://wordpress.org/support/users/edi365/)
 * (@edi365)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/adding-script-that-will-activate-on-form-submit/)
 * I need to add a Facebook Pixel that will fire once the form is submitted.
    How
   can I do that with elementor? And is there a way to do that without any plugins?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Elementor](https://wordpress.org/support/users/davidr90/)
 * (@davidr90)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/adding-script-that-will-activate-on-form-submit/#post-12671715)
 * Hi,
 * Elementor doesn’t have a feature to directly add the tracking pixel code, however,
   you could make use of our [HTML Widget](https://docs.elementor.com/article/294-html)
   to add the analytics code in it.
 * As a possible workaround, you could also consult the guides below:
    [How to Install Facebook Remarketing/Retargeting Pixel in WordPress](https://www.wpbeginner.com/wp-tutorials/how-to-install-facebook-remarketingretargeting-pixel-in-wordpress/)
   [Facebook Pixel Set-up Guide](https://www.facebook.com/business/m/pixel-set-up-step-2)
 * I hope this information helped you
 *  Thread Starter [Edi](https://wordpress.org/support/users/edi365/)
 * (@edi365)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/adding-script-that-will-activate-on-form-submit/#post-12679116)
 * How can I do that? I’m not very good with code.
 * I found [this page about the button widget](https://docs.elementor.com/article/59-button)
   that has a section called “How to Track “Button onClick” Event”.
    This is only
   partially relevant since it’s for a single button, not a form as I need since
   I can’t edit the button’s css id in a form. I need it to run on form submit.
 * Can you help me with the code I need to put in the HTML widget and how should
   I make it fire on form submit?
 * Thanks
 *  Thread Starter [Edi](https://wordpress.org/support/users/edi365/)
 * (@edi365)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/adding-script-that-will-activate-on-form-submit/#post-12685532)
 * I still can’t find a way to “fire” the facebook pixel on form submit.
 * I just need to use the form’s onSubmit or onClick HTML tags but how can I do 
   that?.
 * I would really appreciate your help.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding script that will activate on form submit’ is closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [script](https://wordpress.org/support/topic-tag/script/)
 * [submit](https://wordpress.org/support/topic-tag/submit/)

 * 3 replies
 * 2 participants
 * Last reply from: [Edi](https://wordpress.org/support/users/edi365/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/adding-script-that-will-activate-on-form-submit/#post-12685532)
 * Status: not resolved