Hi - I'm not clear if it is possible to filter out...
# support
c
Hi - I'm not clear if it is possible to filter out events based on IP range? The documentation notes that IP range isn't visible in the live event stream, because it is added later via the backend.. does that also mean that it can not be used in a denylist transformation? Or to ask the actual question... what is the easiest/most complete way to ensure I filter out any web hits coming from designated countries where our support staff work from? I've tried to prevent rudderstack from even loading, but it's not working everywhere..and the most logical place to filter is in the transformation...
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
q
RudderStack automatically collects the user’s IP address in the
request_ip
property as a common field. You can see it in the event received at the destination but not in the Live Events tab. This is because RudderStack adds the IP in the backend while sending the event sent to the destination; it is not a part of the initial event data generated at the source. You can also specify the
ip
field explicitly to anonymize the IP address, in which case it will be captured as a contextual field at the source itself. https://www.rudderstack.com/docs/event-spec/standard-events/common-fields/#how-rudderstack-collects-ip-address You should be able to write a transformation using
event.request_ip
or `event.context.ip`(if you set it explicitly)