# Analytics on forms submitted

**URL:** https://community.elfsight.com/t/analytics-on-forms-submitted/51522
**Category:** General Questions
**Tags:** forms
**Created:** [May 9, 2024, 8:43pm UTC](https://community.elfsight.com/t/analytics-on-forms-submitted/51522 "2024-05-09T20:43:30Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)
#### Post date: [May 10, 2024, 5:42pm UTC](https://community.elfsight.com/t/analytics-on-forms-submitted/51522/3 "2024-05-10T17:42:45Z")

</div>

Welcome to the Community @Stephanie_Neely 👋

Great news, we’ve found a solution for your case!

To check if the form has been successfully submitted, you need to follow these steps

1. Install GTM on your website
2. Install the widget on your website
3. Add this code to the Custom JS field on the Settings tab of your widget’s settings

```auto
widget.on("submit", () => {
  dataLayer?.push({'event': 'elfsight-form-submit'});
});

```

1. In GTM, you should create a Custom Event trigger

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/7/1/71b01db96ac2b3602da502d0b16d25f62442e135.png)

Now, after the form is submitted, the trigger should get activated.

Please check it out and let me know if it worked for you 🙂

---

_[View the full topic](https://community.elfsight.com/t/analytics-on-forms-submitted/51522)._
