Skip to main content

Any tips or examples of the best way to store / use location-based data in campaigns? For example, “send a message to everyone near New York City”?

Is the only way to pre-process data before CIO and add “New York,” “Atlanta,” “Los Angeles” etc to individual profiles?

Ideally, there would be a way to set coordinates or other geo-data and then have CIO dynamically calculate distance, i.e. “within 25 miles of coordinates X, Y”.

Or is there some other way you’ve seen it done in CIO?

The closest thing I could find in the forums was over a year ago, so not sure if there has been any update since then.

Thank you!

 

Hey mtwsf,

as far as I know there has not been any updates. In my opinion (and that’s how I have seen it multiple times) it would be the easiest to use zip codes (like on the other post you mentioned). As fas as I know most postal codes are clustered, e.g. codes starting with “12” are in the same area, so you can simple select everyone whos postal codes start with “12”. But this depends a lot on which purpose you have and who specific your range should be.

I also like the coordinate idea tbh.

Another way could be to use custom objects. Every city or area could be an object and you could create relationships. Pros: You can change the range of the areas to include or exclude more profiles with a single edit (the object).

Hope that helps,
Felix


If you’re focused on the US, I think Felix’s idea is the simplest to work with. Sounds like you’ve got the wheels turning on a couple of other creative ways to do this though, which is often all it takes to make it work. I too don’t know of any easy built in way to do this, but there are plenty of “work-arounds”. Good luck!


@mtwsf i would like to add my 2 cents to the previous answers:

  • i also believe that you have to solve this with work-arounds
  • if you have geo-coordinates available for every user, then calculating the distance between a fixed coordinate and user’s coordinate is quite easy (easier than zip code based rules or any other lookup tables).
  • calculation can be done with Javascript, which you can use in “create or update person” actions in customer.io. ChatGPT can help you create this code (see screenshot below)
  • you would create a campaign that runs through all possible recipients, updates a (temporary) “distance” attribute based on that particular fixed geo-coordinate for the campaign, and then only message those where this attribute value is below a certain value (to be checked in either a branching logic, or just condition on the message itself)

 


Reply