Getting Country into MailChimp

Oct 8, 2010 at 5:28 PM


I have a custom email subscribe form and I'm using v1.2.4 of the PerceptiveMCAPI .NET wrapper to get the subscriber info into MailChimp.  It works fine getting the email and firstname/lastname in, but I'm having trouble getting the country to go into MailChimp.  Or, maybe I just don't know where to look to see the country for a subscriber in MailChimp.

The form I have only collects the country, not the full address.  Nonetheless, in my testing, I tried submitting it with both a full address and just the country.

These are the entries that work fine:

entry.Add("EMAIL", email);            

entry.Add("EMAIL_TYPE", "NotSpecified");            

entry.Add("FNAME", firstName);          

entry.Add("LNAME", lastName);    

To get the country, I've tried a couple of things:      

entry.Add("homeadr", "US");  (only the country)

entry.Add("homeadr", "123 Main Street  Brooklyn    NY  11205   US");    (tab separated)

entry.Add("homeadr", "123 Main Street Brooklyn NY 11205 US");   (space separated)

Does anybody know how to do this?  Am I doing it right, but just not looking in the right place in MailChimp perhaps?  I'm looking in Lists > Select the List > Top Locations (map displayed)

Thank you.


Oct 8, 2010 at 5:40 PM

If you use the string version of the address, the address segments must be separated by TWO spaces -- and MC interprets the address by position, so that's not going to work for your situation anyway. 

You'll want to use the address 'array' option, defining the address as Dictionary<string, object> -- check the MC documentation for the key name...



Oct 8, 2010 at 6:08 PM

Thank you. I’ve gone ahead and done what you suggested (added the country into a dictionary). The form submits just fine and the entry gets into MC, but how can I confirm the country was entered? I don’t see it when I view the subscriber. If I go to Lists > Select a List > Top Locations, I don’t see that subscriber in the country I sent over. Likewise, they don’t come up when I filter by the country.

Is this not the correct place to look for the subscriber’s country?

Thank you.