# Insert a tracking option

**URL:** https://community.elfsight.com/t/insert-a-tracking-option/5963
**Category:** Contact Form
**Tags:** Released
**Created:** [March 31, 2021, 1:44pm UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963 "2021-03-31T13:44:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Giuplata24](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@Giuplata24](https://community.elfsight.com/u/Giuplata24)
#### Post date: [March 31, 2021, 1:44pm UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963/1 "2021-03-31T13:44:20Z")

</div>

Insert a tracking option or a DOM event for tracking sent forms via Google Tag Manager.

---

<div class="post-metadata">

### Author: ![Helga](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/helga/32/1155_2.png) [@Helga](https://community.elfsight.com/u/Helga)
#### Post date: [October 11, 2022, 12:00am UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963/2 "2022-10-11T00:00:00Z")

</div>

Folks, our former Wishlist portal, where our users shared their requests and suggestions, was transferred to this forum. You’re most welcome to vote, add new ideas, and leave your comments here — we surely will consider them all! 🤩

Original Votes: 5

---

<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: [February 9, 2024, 12:09pm UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963/5 "2024-02-09T12:09:19Z")

</div>

Great news, our devs found the solution!

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 🙂

---

<div class="post-metadata">

### Author: ![Sina](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/sina/32/59970_2.png) [@Sina](https://community.elfsight.com/u/Sina)
#### Post date: [November 23, 2024, 11:18am UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963/6 "2024-11-23T11:18:54Z")

</div>

Hi @Max

and the Name of the custom event trigger in GTM is “elfsight-form-submit” or does it matter?

---

<div class="post-metadata">

### Author: ![Helga](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/helga/32/1155_2.png) [@Helga](https://community.elfsight.com/u/Helga)
#### Post date: [November 25, 2024, 9:19am UTC](https://community.elfsight.com/t/insert-a-tracking-option/5963/8 "2024-11-25T09:19:35Z")

</div>

Hi @Sina,

Yes, it should be `elfsight-form-submit` as the name for a custom event 🙂
