• Why PostHog?
  • Products
  • Pricing
  • Docs
  • Community
  • Company
Get started
  • Product OS
  • Product analytics
  • Web analytics
  • Session replay
  • Feature flags
  • Experiments
  • Surveys
  • Data pipelines
  • Data warehouse
  • LLM observability
  • Error tracking
  • Data pipelines integrations

  • Overview
  • Sources
    • Overview
    • Managed

    • Stripe
    • Hubspot
    • Zendesk
    • Postgres
    • Salesforce
    • MySQL
    • Azure SQL Server
    • Snowflake
    • Vitally
    • Chargebee
    • BigQuery
    • Self-managed

    • S3
    • Azure Blob
    • Cloudflare R2
    • Google Cloud Storage
  • Realtime destinations Beta
    • Customization
    • Overview
    • Destinations

    • ActiveCampaign
    • Airtable
    • Attio
    • Avo
    • AWS kinesis
    • Braze
    • Brevo
    • Clearbit
    • Customer.io Popular
    • Discord Popular
    • Engage.so
    • Gleap
    • Google cloud storage
    • Google pub/sub
    • Hubspot Popular
    • Intercom Popular
    • June
    • Klaviyo
    • Knock
    • Loops Popular
    • Mailchimp
    • Mailgun
    • Mailjet
    • Make
    • Meta ads Popular
    • Microsoft teams
    • PostHog
    • Reddit ads
    • Reddit pixel
    • RudderStack
    • Salesforce
    • Sendgrid
    • Slack Popular
    • Snapchat ads
    • TikTok ads
    • Twilio
    • Webhook Popular
    • Zapier Popular
    • Zendesk
  • Batch exports
    • Amazon S3
    • Snowflake
    • BigQuery
    • Postgres
    • Redshift
  • Transformations
    • Downsample
    • Filter Out Plugin
    • GeoIP
    • Language URL stripper
    • Property Filter
    • SemVer Flattener
    • Taxonomy
    • Timestamp Parser
    • URL Normalizer
    • URL parameters to event properties
    • User Agent Populator
  • Troubleshooting and FAQs
GeoIP

GeoIP

Enrich events with GeoIP data

Using our REST API you can create this transformation like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "transformation",
"name": "GeoIP",
"inputs": {},
"enabled": true,
"template_id": "plugin-posthog-plugin-geoip"
}'
  • Products

  • All products
  • Product analytics
  • Web analytics
  • Session replay
  • Feature flags
  • Experiments
  • Surveys
  • Product OS
  • Data connections
  • Customer stories
  • PostHog vs...
  • For startups
  • Pricing
  • How we do "sales"
  • Founder stack
  • Product OS

  • New? Start here.
  • SDKs
  • Framework guides
  • Data management
  • SQL access
  • Toolbar
  • API
  • Docs

  • Product analytics
  • Session replay
  • Feature flags
  • Experiments
  • Surveys
  • CDP
  • Data warehouse
  • Migrate
  • Community

  • Questions?
  • Guides
  • Integrations
  • Dashboard templates
  • Founders
  • Product engineers
  • Tracks
  • Merch
  • Contributors
  • Newsletter
  • PostHog FM
  • PostHog on GitHub
  • Cool tech jobs
  • Handbook

  • Why we're here
  • Our story
  • How we work
  • Values
  • Tips for working here
  • Team structure
  • Engineering
  • Design
  • Marketing
  • Company

  • About
  • Roadmap
  • Changelog
  • People
  • Small teams
  • Blog
  • Investors
  • Press
  • FAQ
  • Security
  • Support
  • Careers
© 2025 PostHog, Inc.
  • System status
  • 👉Generate a DPA👈(It's guaranteed fun!)
  • SOC 2
  • HIPAA
  • Privacy policy
  • Terms
  • Product OS
  • Product analytics
  • Web analytics
  • Session replay
  • Feature flags
  • Experiments
  • Surveys
  • Data pipelines
  • Data warehouse
  • LLM observability
  • Error tracking
  • Why PostHog?
  • Products
  • Pricing
  • Docs
  • Community
  • Company