Set a Contact's Location from the Server Side

Set a Contact's Location from the Server Side

If you are exploring someone's Klaviyo Profile, you will notice a section labeled Location. Klaviyo automatically populates this section in one of two ways:

  1. If you have Klaviyo Web Tracking configured on your website, we can determine a contact's location when he/she clicks through a Klaviyo email or fills out a Klaviyo sign up form using IP Geolocation
  2. For any integration where Klaviyo is able to capture a billing address when a purchase takes place, we will use a contact's billing addresses to set the location on his/her profile

From our JavaScript library, we automatically pull in someone's IP, so if you are sending Klaviyo information in that way, we'll pick up a users location for you.

From the server side, if you pass a property $ip in the event properties, we'll parse that. If you want to manually set someone's location (city, state/region, country, zip code), then you can pass $city, $region, $country, and $zip.

Was this article helpful?
0 out of 0 found this helpful