I have a landing page which embedded in many websites. It's role is to collect users data. I want to track these data to know from where each user come? how can I do this tracking using PHP ?
There are Multiple ways to Check From which source user has submitted data. This is basically used in Analytics Platforms to gather statstics. Below are few of them
A) Distribute your landing page in a way so every other site which embed your page get Unique Code and When submit the data you will get back that source along with other data this way you will be able to build your own tool
B) using $_SERVER['HTTP_REFERER'] to trace the routed page from anywhere along with appropriate query string
Other ways include throguh Javascript you can pass XHR request on load of your iframe but that will be complicated way if you can handle it properly than only go for it.