Skip to content

Commit

Permalink
Merge pull request #21 from rudderlabs/Jayachand-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
Jayachand authored May 2, 2023
2 parents 66d9c16 + 4906510 commit 54e14a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function transformEvent(event, metadata) {
```javascript
export async function transformEvent(event, metadata) {
if (event.request_ip) {
const res = await fetch("https://ip2.app/info.php?ip=" + event.request_ip);
const res = await fetch("<YOUR_API_ENDPOINT>" + event.request_ip); // Use your paid IP-to-geolocation API endpoint.
event.context.geolocation = res;
}
return event;
Expand Down
2 changes: 1 addition & 1 deletion sample-python-user-transformations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ import requests

def transformEvent(event, metadata):
if event.get("request_ip"):
res = requests.get("https://ip2.app/info.php?ip=" + event["request_ip"])
res = requests.get("<YOUR_API_ENDPOINT>" + event["request_ip"]) # Use your paid IP-to-geolocation API endpoint.
if res.status_code == 200:
event["context"]["geolocation"] = res.json();
return event
Expand Down

0 comments on commit 54e14a3

Please sign in to comment.