Session and HTTP_REFERER
This is an open discussion with 4 replies, filed under General.
Search
Do you mean anytime someone accesses the site generally or anytime someone interacts with the site via a form or event?
Hi, @wjnielsen.
I need store the external referer for all access, and the internal referer only when someone access the contact page. But I need read it only on submit form (event). I'm using the Email Template Manager extension now to send contact form.
The website is online, http://www.cligtelecom.com.br
When you create the section in which to store the emails sent from the contact form you could add an extra field for the referring page and ip address. Here's a screenshot of fields I've used in the past.
Then you adapt the load()
function in your event to something like this:
public function load() { if (isset($_POST) && !empty($_POST)) { $_POST['fields']['originating-page'] = $_SERVER['HTTP_REFERER']; $_POST['fields']['ip-address'] = $_SERVER['REMOTE_ADDR']; } if(isset($_POST['action']['contact'])) return $this->__trigger(); }
As far as collecting referrers to your site generally, why not use something like Google Analytics?
Hi, @wjnielsen.
Thank you very much, I will try it.
Create an account or sign in to comment.
Hi Symphonyans,
I need store the "external" referer when access website and store the "internal" referer when access contact page to pass these vars on contact form.
So, I was looking for some extension to store and read the session etc, but I'm not a developer so I could not find the right way to do that.
Can somebody guide me to find the best way or extension to do it?
Thank you very much.