I host three websites on the same physical server, and of course by the Host
header I know which website the user requests. For the sake of the example these are the domains:
blog.website1.example
shop.com
users.website2.example
There are around 4-5 companies which should use these websites, and I know their IP addresses. One of the companies requested that for their users, I add Javascript tracking (like google analytics). So I was wondering, how could I (based on the company IP addresses) analyze only their clients?
I wouldn't want to add it to one page / all companies. I want to append the script tag to all requested pages, requested by clients with specific IP address and I don't want to touch any of the website's code, and I also don't want all the clients receiving it (I dont want to do clientside filtering).
I really just want the script appended to specific IP's pages. Is it possible on both apache/nginx?