Filtering IP addresses shared via a proxy server
A large multinational client of mine has offices all across the world. For security purposes, all the internal traffic is sent to a proxy server and then visit their website. The proxy server generates random IPs from time to time so it is difficult to filter using GA console. However, the proxy server shares a x-forwarded-for file which contains the origination IP. However, I don't know what code on GA can extract that x-forwarded-for IP and then exclude that traffic from the GA results. Pls help.
Re: Filtering IP addresses shared via a proxy server
ga('set', 'dimension1', 'Internal traffic');
// Send the custom dimension value with a pageview hit.
Filter fields for View filters: https://support.google.com/analytics/answer/1034380?hl=en
Hope it helps.