Inferred geography when inserting leads via the SOAP API | Community
Skip to main content
December 1, 2013
Solved

Inferred geography when inserting leads via the SOAP API

  • December 1, 2013
  • 4 replies
  • 2244 views
When I collect leads through standard Marketo forms it runs a little extra logic to lookup geo info from the IP and sets fields like Inferred State and Inferred Country. Very useful indeed. Is there a way to get that same logic to fire when I insert leads through the SOAP API? Maybe by populating an anonymous IP field?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

Reviewing some of my older posts and thought I'd mention the approach we landed on here. We've moved on to the REST API and use associateLead to tie the user's munchkin cookie to the lead we're interested in. In most cases this seems to preserve their anonymous IP and inferred fields. I can't remember for sure if we ever got this to work with the SOAP API and syncLead.

4 replies

Accepted solution
December 1, 2015

Reviewing some of my older posts and thought I'd mention the approach we landed on here. We've moved on to the REST API and use associateLead to tie the user's munchkin cookie to the lead we're interested in. In most cases this seems to preserve their anonymous IP and inferred fields. I can't remember for sure if we ever got this to work with the SOAP API and syncLead.

December 5, 2013
Thank you both. It's a bit of a bummer to reinvent the wheel here. We'll probably use Maxmind too, but that won't populate the Inferred fields that I already have smart lists built against. I think it would be great if from the SOAP API I could pass in the requester's IP and Marketo did the geo call and populated all of the standard Inferred fields.
December 2, 2013
Hi David, 

We use Maxmind to do what you are wanting, their API is pretty easy to work with.  

We collect all of this data using their webservice API:
Geo-IP Latitude
Geo-IP Longitude
Geo-IP City
Geo-IP State
Geo-IP Postal Code
Geo-IP Country
Geo-IP TimeZone
Geo-IP ConnectionType
Geo-IP ISP

As bgomes said, there are some quirks with GeoIP- we've noticed if someone is browsing on a cell phone it may show a different state then where the user is.  You can write your script to ignore the geoIP data when the ISP has 'cellular', 'wireless' etc. in the name. 

hope it helps!
December 2, 2013
You can reverse the IP address to gather geographical imformation using an external API. Services such as geoiptool.com provide excellent information. You can then populate custom fields. The Inferred City and similar are not exposed to SOAP API.

Please keep in mind GeoIP is relatively accurate. Users connecting through a corporate VPN may have discrepant informatiion between the country they fill in a form and the inferred country. That is expected since most VPN will have the VPN based on corporate node rather than its actual location.