iGeoIP Instructions

General Settings & Instructions

infusion[GEO] is accessible in 3 ways.

  1. With 9999 any Infusionsoft form live (Webform)
  2. By HTTP POST from Infusionsoft as an action (Action Set, Followup Sequence, Trigger)
  3. For page personalization (Write Their GEO Fields to the Page,Show a Map)

Setting Up Your Custom Field to Store the IP Address

For example, if you had a custom field in Infusionsoft which you named "IP Address", the field value would most likely be "_IPAddress". Infusionsoft takes out the spaces & adds an "_" to the beginning of the field name for custom fields.

Please note that if you ever created a field, then deleted it and created it again, Infusionsoft will automatically append a number to the field name. Please ensure that your custom field names are really called what you think they are called.

If you have problems with this, please watch the video again because it explains how to check for the real field name and be sure you have the exact value necessary. 

Field Mapping

To tell the gateway where to put the GEO information, you need to pass field mappings in your post. 

In following example, we're telling the system to take the "city" or GEO City that is looked up using the persons IP address and put whatever value is returned for "city" into a field in Infusionsoft called "City3" which is otherwise known as Infusionsoft's "Optional Address City". 

The reason we suggest using the address fields with "3" at the end like "City3" (otherwise known as Infusionsoft's "Optional Address") is that you would not want to assume this is someone's shipping address or their billing address based only on the IP address. 

The person could be visiting your site from any internet connection or coffee shop. They could even be vacationing in another country. The address information given back should be not be considered as a good address for anything critical for that reason. 

System Parameters

  • gtwid: Your account code from our system (Yours is: 9999
  • ipfield: The field you want to get the IP Address from when using HTTP POST 

GEO Location Values Returned

  • latitude: Where to store the GEO Latitude that is returned
  • longitude: Where to store the GEO Longitude that is returned
  • city: Where to store the GEO City that is returned
  • state: Where to store the GEO State that is returned
  • statecode: Where to store the GEO State Code that is returned
  • zipcode: Where to store the GEO Zip that is returned
  • country: Where to store the GEO Country that is returned
  • countrycode: Where to store the GEO Country Code returned
  • metrocode: Where to store the GEO Metro Code that is returned
  • areacode: Where to store the GEO Phone Area Code that is returned
  • organization: Where to store the GEO Organization that is returned
  • isp: Where to store the GEO ISP or Internet Service Provider that is returned
  • timezone: Where to store the GEO ISP or Internet Service Provider that is returned

Additional Notes

Not all countries have all aspects of the GEO location service. Costa Rica for example does not have zip codes. 

Part 1: Submitting GEO Data With Forms

For capturing new data, you can add the following script at the top of any page you'd like to automatically submit GEO data to Infusionsoft. Notice the script has the same field mappings (city=City3) as all the samples above so the same concepts apply here. Whatever you map in this script will end up in Infusionsoft. 

  • Download a sample javascript include
  • Watch 2 videos explaining the sample and how to use it:

    What's in the Javascript:

    How to Use it with an Infusionsoft Webform:

(Note: Instead of "http://gtw01.moldingsoft.net", please use "https://gateway.responseflow.com")

Please note Again, this sample assumes that your custom IP Address field is simply named "IP Address" with an official database name of "_IPAddress" and it assumes that you want all the GEO data that we retreive put into the address "3" fields. 

One major difference here is that the ipfield value you give is actually where the IP Address will be written to, NOT where it is read from like when you're doing an HTTP POST. Other than for "legacy" forms, any custom fields used MUST be added to the form as "hidden fields". This means is that if you supply a custom field value like "ipfield=_IPAddress" then whether your _IPAddress field in Infusionsoft was set or not, it's going to be overwritten with the actual IP of the visitor currently submitting the form. 

Part 2: Retrieving GEO Data With a "HTTP POST" For Existing Data

Generally, if you need to use a HTTP POST, it will be because you want to check the GEO information of your OLD customers in Infusionsoft. For collecting GEO information on NEW customers, you do not need to use the HTTP POST. 

A sample httppost might look something like the one below depending on your preferences. Be sure to check the field mapping before using it. The link below is ready to go if you are using the same field mappings from the examples in the field mapping section. 

  • http://gateway.responseflow.com/gateways/gateway_geoip.php?gtwid=9999&city=City3&statecode=State3&country=Country3&latitude=Address3Street1&longitude=Address3Street2&ipfield=_IPAddress&timezone=_TimeZone 

Part 3: Customizing Your Pages with GEO Data

Print Values to the Page

This requires that the same script from part 1 is on the page to work. If it is, you can use a small bit of javascript in your webpages source code like the bolded text below which would print the persons country... 

  • <script>document.write(COUNTRYNAME);</script>

Other possible values to print to the page include:

  • IPADDRESS
  • COUNTRYNAME
  • COUNTRY
  • CITY
  • REGIONNAME
  • REGION
  • POSTALCODE
  • METROCODE
  • AREACODE
  • LATITUDE
  • LONGITUDE
  • TIMEZONE

Create a Google Map

You no longer need a Google api key. Simply paste this script into your webpage where you want the map to appear.

  • Download a sample javascript include