# Changing or adding to Referrer on Form Lead

**URL:** <https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416>\
**Category:** Product Support\
**Created:** [September 25, 2015, 3:01pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416 "2015-09-25T15:01:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [September 25, 2015, 3:01pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/1 "2015-09-25T15:01:31Z")

</div>

When a user submits a Mautic form, what do I need to add to the form to change the referrer information that is coming across. The easiest way to explain this would be a program that handles split testing, and I am trying to determine which set of copy they were looking at when they submitted the form. On the Mautic side I get the page URL, but I need to know was it, copy a, copy b, copy c version of the page. Or do I need to add a field to the lead, and populate that with a hidden variable? I would really like to avoid having multiple copies of the forms (on the Mautic side) to accomplish this.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [September 25, 2015, 3:01pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/2 "2015-09-25T15:01:31Z")

</div>

When a user submits a Mautic form, what do I need to add to the form to change the referrer information that is coming across. The easiest way to explain this would be a program that handles split testing, and I am trying to determine which set of copy they were looking at when they submitted the form. On the Mautic side I get the page URL, but I need to know was it, copy a, copy b, copy c version of the page. Or do I need to add a field to the lead, and populate that with a hidden variable? I would really like to avoid having multiple copies of the forms (on the Mautic side) to accomplish this.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 28, 2015, 8:13am UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/3 "2015-09-28T08:13:49Z")

</div>

I’d use a hidden field of the form and fill in the value by javascript on the website the form is showed in.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [September 29, 2015, 1:37pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/4 "2015-09-29T13:37:22Z")

</div>

I understand a hidden field and I know how to set that, what field name do I need to set that will override the value Mautic is picking up as the referrer (which is probably a server/environment variable)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 7:11am UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/5 "2015-09-30T07:11:06Z")

</div>

Yes, referrer is sent in the header of the HTTP request.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [September 30, 2015, 12:51pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/6 "2015-09-30T12:51:09Z")

</div>

So i am back to my original question, how do i change the value mautic is using as the referrer?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 30, 2015, 12:57pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/7 "2015-09-30T12:57:43Z")

</div>

You’d have to use a proxy script. Submit the form to that script, modify referrer header and send it to Mautic. That’s why I thing is easier to use a hidden field for carrying some additional information.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [September 30, 2015, 5:23pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/8 "2015-09-30T17:23:11Z")

</div>

So the answer is, I really can’t change the referrer details coming across, all I can do is create a custom field and populate that.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 1, 2015, 5:05am UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/9 "2015-10-01T05:05:20Z")

</div>

I don’t think that’s the correct summary. You can do anything. I described how to change the referrer. But why to do it the hard way, when there is easy one? A form is tool to transfer information. There is no need to change HTTP header to do it. Just use a form field.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 2, 2015, 2:49am UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/10 "2015-10-02T02:49:29Z")

</div>

Except referrer shows up by default in all the Mautic campaign and lead screens and such. So adding a form gets it done, but it is twice the effort to analyze the data, not to mention we have over a dozen different A/B tests going on at once. Ideally, I would like Mautic to store a hidden form field value if it exists as the referrer and if it doesn’t exist use the referrer passed by the header.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/changing-or-adding-to-referrer-on-form-lead/2416/11 "2020-02-02T22:57:58Z")

</div>


