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.
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.
I’d use a hidden field of the form and fill in the value by javascript on the website the form is showed in.
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)
Yes, referrer is sent in the header of the HTTP request.
So i am back to my original question, how do i change the value mautic is using as the referrer?
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.
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.
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.
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.