With RudderStack’s geolocation enrichment feature, you can enrich your incoming source events with the following geolocation information:
City
Country
Region
Location
Postal code
Timezone
This feature sends the geolocation-enriched events to all the destinations that are connected to the source. However, note that the destinations may or may not accept the geolocation-enriched properties depending on the event format they support. See FAQ for more information.
To enrich your source events with geolocation data, add a source in your RudderStack dashboard. Then, go to the Settings tab and turn on the Enable geolocation enrichment toggle.
Turning on the Enable geolocation enrichment toggle sends the enriched events to all the destinations connected to the source.
How source-level geolocation enrichment works
The following workflow assumes you have turned on the Enable geolocation enrichment toggle in the RudderStack dashboard:
RudderStack ingests the incoming source event.
It picks the first non-blank value from ip passed by the user in the context object of the event payload or request_ip (automatically collected by RudderStack).
RudderStack enriches the event with the geolocation information at a hardcoded location within the context section (context.geo). A sample geolocation-enriched object is shown:
Ideally, the context object should be a valid map for RudderStack to attach the geolocation enrichment information.
If the object is not a valid map but of some other data type, RudderStack will not change its data type or format. In this case, the context object will remain unchanged and RudderStack will not add the enriched geolocation information in context.geo.
If the first non-blank value is invalid, RudderStack updates context.geo as follows:
If the event payload already has a geo field within the context object, RudderStack will not perform geolocation enrichment. It will not override the existing geo field with the enriched data.
RudderStack then transforms the event into the destination-specific format.
License
This feature leverages the GeoLite2 data created by MaxMind, available from https://www.maxmind.com.
The other cloud destinations may or not accept the geolocation-enriched event properties, depending on the event format they support.
I want to send the geolocation-enriched events to selective destinations and not all destinations connected to the source. Is this feature helpful?
This feature sends the geolocation-enriched events to all the destinations that are connected to the source. To send events to selective destinations, you can connect the geolocation enrichment transformation to those destinations instead.
Go to the destination in the dashboard. Click the Transformation tab and click Add a transformation:
Click Create Transformation.
Under New Transformation, click Custom transformation.
What happens if context object is absent in the event payload?
RudderStack adds the context object and includes the enriched geolocation information in it.
What happens if I toggle off the geolocation enrichment setting?
Once you toggle off the Enable geolocation enrichment setting, RudderStack stops the enrichment process almost instantly, even if you have valid IPs coming in your source events.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.