Set edge IP/geo enrichment
Turn edge IP/geo stamping on or off. Requires an agency key (ak_) and ?location_id=; viewer keys get 403 agency_required.
When on, the ingest worker adds $ip, $geo_country, $geo_region, $geo_region_code, $geo_city and $geo_postal from Cloudflare's edge data for the request. Three reasons to prefer it over the browser's own lookup: it cannot be spoofed by the client, it costs the visitor no round trip, and it is present on the first event of a visit — the SDK's own lookup never blocks a capture, so an early event would otherwise carry no geo.
Properties already on the event win, so an SDK-supplied $geo_* or an explicit $ip is never overwritten. Cloudflare's unknown/Tor sentinels (XX, T1) are skipped rather than stored, because they cannot match a real person and only degrade Meta's match quality.
This is also where match rate comes from for server-side conversions: the values feed Meta CAPI client_ip_address and the hashed ct/st/zp/country keys.
Off by default, and never applied to HIPAA tenants — IP and geo are identifying.
curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/settings/ip-geo-enrichment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"ip_geo_enrichment": true
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/settings/ip-geo-enrichment"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"ip_geo_enrichment": true
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/settings/ip-geo-enrichment", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"ip_geo_enrichment": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"ip_geo_enrichment": true
}`)
req, err := http.NewRequest("PUT", "https://mythic-analytics.gulp.workers.dev/client/v1/settings/ip-geo-enrichment", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/settings/ip-geo-enrichment')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"ip_geo_enrichment": true
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"ip_geo_enrichment": true,
"effective": {
"enabled": true,
"blocked_by_hipaa": true
}
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
/ip-geo-enrichment
Target server for requests. Edit to use your own host.
Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.The media type of the request body
Whether the ingest edge stamps $ip and $geo_* on every event.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Builder/client key as a bearer token. Agency key for read-write (Bearer ak_...) or viewer key for read-only (Bearer sk_...). Scoped keys (mcp_) are accepted too and need settings:read or settings:write. See Using an mcp_ key over HTTP.
Body
Whether the ingest edge stamps $ip and $geo_* on every event.