Is it possible to add HTTP referer to Customers>Online Customers, in the admin area?

1 Answer 1


It should be possible. Before you get started though you may want to check your log_visitor_info table to determine if the data is worth adding. I've found that more often then not the data recorded is not very helpful.

Looking in: /app/code/core/Mage/Adminhtml/Block/Customer/Online/

The best way to handle this is to create a new module to override the core functionality.

Alternatively you can copy the files in that directory to: /app/code/local/Mage/Adminhtml/Block/Customer/Online/

After that though, you need to figure out how to get the data from the log_visitor_info table as I'm not entirely familiar with that process right now. The current row provided to the rendering classes contains the following fields:

  • visitor_id
  • visitor_type
  • remote_addr
  • first_visit_at
  • last_visit_at
  • customer_id
  • last_url
  • customer_lastname
  • customer_middlename
  • customer_firstname
  • customer_email

You will need to modify Grid.php _prepareCollection function to pull in the additional data (notice that right now it's pulling the first 7 fields from the log_visitor_online table, then it adds the customer data with the call to $collection->addCustomerData()) and the _prepareColumns function to set up the grid columns. Then you'll just need to create a renderer for the new data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.