How to save the source URL with a form submission

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.

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

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

1 Like

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

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

I suggested adding a segment filter to access it:

If you find it interesting you can vote for the idea :wink:

Pierre

1 Like

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.

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.