Hello, trying to use the sample geolocation enrich...
# support
c
Hello, trying to use the sample geolocation enrichment transformation using this code:
export async function transformEvent(event, metadata) {
if (event.request_ip) {
const res = await fetch("https://ip2.app/info.php?ip=" + event.request_ip);
event.context.geolocation = res;
}
return event;
}
It's from the support page for transformations, I can't even get the sample input code to return any change in output.
Never mind, figured it out. it should be context.ip everywhere that it says request_ip.
✅ 1
🙌 1