Related page field

Hello, amazing community.
I am trying to figure out something with my reporting. I am using the URL of the page the form is on to track the agent the form is related to.

Currently, sometimes it shows the wrong URL in the database. In the email, though I have another variable I can ask for {referral} that gives me the right url.

Here is the image of the data. You can see sometimes it gives me admin-ajax.php .