# How to save the source URL with a form submission

**URL:** <https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762>\
**Category:** General Discussion\
**Created:** [April 16, 2022, 2:47am UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762 "2022-04-16T02:47:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfern87](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cfern87/32/3696_2.png) [@cfern87](https://forum.mautic.org/u/cfern87)\
**Post date:** [April 16, 2022, 2:47am UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/1 "2022-04-16T02:47:10Z")

</div>

**Your software**  
My Mautic version is: v3.3.5  
My PHP version is: PHP Version 7.3.33-1+0~20211119.91+debian9~1.gbp618351  
My Database type and version is: mysqliw

Hi all. Does anyone have any idea on how I might create a form, embed it on a separate page, and have the form somehow save the source page’s url?  
Use Case: I have an online education platform and want to create a feedback form. I’m considering not using mautic for this, but I would like to create automated follow ups based on submission, so it seems like “the closest to the metal” solution.

---

<div class="post-metadata">

**Author:** ![patrickeidemiller](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/patrickeidemiller/32/511_2.png) [@patrickeidemiller](https://forum.mautic.org/u/patrickeidemiller)\
**Post date:** [April 16, 2022, 4:52am UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/2 "2022-04-16T04:52:52Z")

</div>

It really depends how/where the form is hosted.

Personally I create my forms in Mautic and then present them in my wordpress sites that have the Mautic plug in installed. Basically this iframes the form into wordpress so the form is skinned to match the wordpress theme.  
Mautic

---

<div class="post-metadata">

**Author:** ![pierre\_a](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pierre_a/32/7031_2.png) [@pierre\_a](https://forum.mautic.org/u/pierre_a)\
**Post date:** [April 21, 2022, 5:50pm UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/3 "2022-04-21T17:50:57Z")

</div>

Hello @cfern87,

My first suggestion is to update Mautic to its latest version.  
You will have for each form submission the “referring” URL, this will allow you to know on which page (URL) the form has been submitted.

Can you come back and tell us how it worked for you?

Pierre

---

<div class="post-metadata">

**Author:** ![cfern87](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cfern87/32/3696_2.png) [@cfern87](https://forum.mautic.org/u/cfern87)\
**Post date:** [April 21, 2022, 6:24pm UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/4 "2022-04-21T18:24:28Z")

</div>

Can I have the referring URL be accessible via the api or in the results section?

I would be hosting the form in Mautic, then presenting on the wordpress site.

But I do need to track that url, so even if it’s an iFrame I want to make sure that comes through

![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2daeaa8b5f19f0bc209d976c02bd6acb51b00b0a.gif)ᐧ

---

<div class="post-metadata">

**Author:** ![pierre\_a](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pierre_a/32/7031_2.png) [@pierre\_a](https://forum.mautic.org/u/pierre_a)\
**Post date:** [April 21, 2022, 6:31pm UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/5 "2022-04-21T18:31:01Z")

</div>

@cfern87For the moment it is accessible in the “Activity” section of your contact.

I suggested adding a segment filter to access it:

> [@Segment filter : form referrer](https://forum.mautic.org/t/segment-filter-form-referrer/22982):
>
> Hello everyone, The use case: an identical Mautic form, submitted on several pages, the contact who submits the form is recorded in a different segment depending on the referring page. When a contact submits a Mautic form a “Referrer” data is stored in his action history. This data could be accessible from the segment filters in order to be able to create a Mautic segment taking into account only the contacts who have submitted a form on a given page. What do you think about this? Pierre

If you find it interesting you can vote for the idea 😉

Pierre

---

<div class="post-metadata">

**Author:** ![cfern87](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/cfern87/32/3696_2.png) [@cfern87](https://forum.mautic.org/u/cfern87)\
**Post date:** [April 21, 2022, 8:03pm UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/6 "2022-04-21T20:03:58Z")

</div>

Yeah, I need it as some kind of field. There will be a lot of pages. It plus the email essentially serves as a PK for the kind of data I’m looking for.

![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2daeaa8b5f19f0bc209d976c02bd6acb51b00b0a.gif)ᐧ

---

<div class="post-metadata">

**Author:** ![patrickeidemiller](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/patrickeidemiller/32/511_2.png) [@patrickeidemiller](https://forum.mautic.org/u/patrickeidemiller)\
**Post date:** [May 30, 2022, 3:29pm UTC](https://forum.mautic.org/t/how-to-save-the-source-url-with-a-form-submission/23762/7 "2022-05-30T15:29:25Z")

</div>

A crude way of getting this data into a field would be:

1. Create a segment for each URL, then add a filter for that segment based upon ‘visited url’. That gives you which page the form was submitted from.

2. Create a set of campaigns, one for each segment that updates your custom URL field with the URL.
