# Capturing info from non Mautic forms

**URL:** <https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777>\
**Category:** Product Support\
**Created:** [October 21, 2022, 6:58pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777 "2022-10-21T18:58:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 21, 2022, 6:58pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/1 "2022-10-21T18:58:44Z")

</div>

I am looking to push info from a non Mautic form to Mautic for tracking purposes and capturing conversions.

What is the easiest way to do this so that it captures the tracking cookie and merges with the already existing anonymous data?

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 22, 2022, 7:32am UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/2 "2022-10-22T07:32:50Z")

</div>

This is how I do it.

[![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/cc79147c753b17dc76e7c427ad5d254287ded049.jpeg "How to integrate Thrive Leads with Mautic") ](https://www.youtube.com/watch?v=fLxz_xMXQ68)

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 24, 2022, 1:00pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/3 "2022-10-24T13:00:08Z")

</div>

Wow, that’s exactly what I’m trying to do. Thank you soooo much. Just need to figure it out with other forms but as long as it passes the info to url I should be good from what I understand.

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 24, 2022, 2:29pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/4 "2022-10-24T14:29:36Z")

</div>

I used this code as you indicated:

script\>  
var \_\_fields = decodeURIComponent(location.search.toString().slice(1)).split(“&”)

\_\_fields.forEach( param=\> {  
const [fieldName, fieldValue] = param.split(“=”);  
const el = document.querySelector(`form *[name="mauticform[${fieldName}]"]`);  
if( !!el ) el.value = fieldValue;  
})

It’s not passing the info to the mautic form, is there something I need to change in that code?

The fields are showing in the URL

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 24, 2022, 3:53pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/5 "2022-10-24T15:53:11Z")

</div>

```auto
<script>
var __fields = decodeURIComponent(location.search.toString().slice(1)).split("&")

__fields.forEach( param=> {
  const [fieldName, fieldValue] = param.split("=");  
  const el = document.querySelector(`form *[name="mauticform[${fieldName}]"]`);
  if( !!el ) el.value = fieldValue;
})
</script>

```

Double check the code. The above is taken right from my site where it works daily.

If you copied the code from my blog, then I have had issues with the editor adding space to the code that don’t belong.

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 24, 2022, 5:45pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/6 "2022-10-24T17:45:49Z")

</div>

Got it thanks.

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 28, 2022, 11:54am UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/7 "2022-10-28T11:54:45Z")

</div>

@leoschuler @robm is there a way to also capture the information using the following tracking pixel?

```auto
https://example.com/mtracking.gif?page_url=cart_screen&email=myemail@example.com

```

How would I putll the email value using this example?

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [October 28, 2022, 7:17pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/8 "2022-10-28T19:17:17Z")

</div>

not sure I understand what you trying to do, the link you have as an example is the mautic tracking gif, do you want to read the data from the page url and include it in the tracking gif, is that what you want?

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [October 31, 2022, 12:15pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/9 "2022-10-31T12:15:58Z")

</div>

Yes, thanks to Rob I can now capture this if I can embed a hidden form but times when I can’t can I capture form fields from the tracking gif?

---

<div class="post-metadata">

**Author:** ![leoschuler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leoschuler/32/4798_2.png) [@leoschuler](https://forum.mautic.org/u/leoschuler)\
**Post date:** [November 1, 2022, 2:29pm UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/10 "2022-11-01T14:29:50Z")

</div>

you can create a script that loads the gif url with the same parameters of the page url you are visiting, you can also customize the track function

`mt('send', 'pageview', {email: 'my@email.com', firstname: 'John'});`

those solutions will involve insert a javascript into the page, which is the same requirement for adding a hidden form

more details of the tracking script here: [Contact tracking | Mautic](https://docs.mautic.org/en/contacts/manage-contacts/contact-monitoring)

---

<div class="post-metadata">

**Author:** ![candidatehub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/candidatehub/32/4688_2.png) [@candidatehub](https://forum.mautic.org/u/candidatehub)\
**Post date:** [November 2, 2022, 12:41am UTC](https://forum.mautic.org/t/capturing-info-from-non-mautic-forms/25777/11 "2022-11-02T00:41:35Z")

</div>

My question, and maybe this is because I’m not developer, is what goes in the where it says email: ‘my@email.com’ I’m sure you need to put the Field HTML values or something there. Sorry for the newbie question
