OPTIN_IP and geolocation

258 views
Skip to first unread message

Rich Collins

unread,
Oct 17, 2013, 12:39:42 AM10/17/13
to mailchimp-...@googlegroups.com
I'm using the 'mailchimp-api' Ruby gem with a custom form to add subscribers.  When I add a subscriber, I set the OPTIN_IP.

Subscribers never have their LATITUDE, LONGITUDE or REGION set, even after they open an email.

I noticed when I download my subscribers as a CSV, OPTIN_TIME and OPTIN_IP are empty and CONFIRM_TIME and CONFIRM_IP have the values that I set via the API.  Is there possibly a bug in the Ruby gem?  Might this be why I never see the GEO fields get set?

jesse

unread,
Oct 17, 2013, 7:44:38 AM10/17/13
to mailchimp-...@googlegroups.com
There's no bug - it just means you're somehow not sending along OPTIN_IP correctly on the initial subscribe. And obviously opens/clicks have nothing to do with the API, but data that can be populated eventually will.


jesse

Rich Collins

unread,
Oct 17, 2013, 4:28:15 PM10/17/13
to mailchimp-...@googlegroups.com
> There's no bug - it just means you're somehow not sending along OPTIN_IP correctly on the initial subscribe.

Why would this set the CONFIRM_IP but not the OPTIN_IP?

mc.lists.subscribe(ENV['LIST'],
{ email: email },
{
'FNAME' => name,
'DUEDATE' => due_date.to_s,
'OPTIN_TIME' => optin_time.to_s,
'OPTIN_IP' => optin_ip
},
'html',
false
)

> And obviously opens/clicks have nothing to do with the API, but data that can be populated eventually will.

It isn't being populated in our case. Presumably because OPTIN_IP is never set.

BTW here is an example row from the CSV:

"Email Address",Name,"Baby's Due Date / Actual Birthday",MEMBER_RATING,OPTIN_TIME,OPTIN_IP,CONFIRM_TIME,CONFIRM_IP,LATITUDE,LONGITUDE,GMTOFF,DSTOFF,TIMEZONE,CC,REGION,LAST_CHANGED,LEID,EUID
richc...@gmail.com,"Rich Collins",2013-10-31,2,,,"2013-10-16 21:09:05",69.181.96.244,,,,,,,,"2013-10-16 21:09:05",XXX,XXX
> --
> You received this message because you are subscribed to a topic in the Google Groups "MailChimp API Discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/mailchimp-api-discuss/uvYjuBE2IUE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to mailchimp-api-di...@googlegroups.com.
> To post to this group, send email to mailchimp-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mailchimp-api-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.

jesse

unread,
Oct 18, 2013, 7:04:12 AM10/18/13
to mailchimp-...@googlegroups.com
I suspect if you turn on debugging you'll find that what's being sent by those vars is not an IP. And, again - anything set by opens and clicks has nothing to do with the API and even less to do with the OPTIN_IP being set.


jesse
> To unsubscribe from this group and all its topics, send an email to mailchimp-api-discuss+unsub...@googlegroups.com.

Rich Collins

unread,
Oct 18, 2013, 11:34:45 AM10/18/13
to mailchimp-...@googlegroups.com
I hard coded the values and added the location so it would geo based on IP:

mc.lists.subscribe('XXX',
{ email: "richc...@gmail.com" },
{
'FNAME' => "Rich",
'DUEDATE' => "2013-10-31",
'OPTIN_TIME' => "2013-10-18 08:15",
'OPTIN_IP' => "69.181.96.244",
'MC_LOCATION' => 'anything'
},
'html',
false
)

It still shows the values under the CONFIRM_TIME and CONFIRM_IP when I download my subscribers as CSV:

"Email Address",Name,"Due Date",MEMBER_RATING,OPTIN_TIME,OPTIN_IP,CONFIRM_TIME,CONFIRM_IP,LATITUDE,LONGITUDE,GMTOFF,DSTOFF,TIMEZONE,CC,REGION,LAST_CHANGED,LEID,EUID
richc...@gmail.com,Rich,2013-10-31,2,,,"2013-10-18 01:15:00",69.181.96.244,37.8344000,-122.2890000,-8,-7,America/Los_Angeles,US,CA,"2013-10-18 08:26:10",XXX,XXX

My guess is that this is just a labeling bug in the CSV. When I get the subscriber info using the member_info, it shows it under the "ip_opt" key.

Adding 'MC_LOCATION' => 'anything' sets the LAT LONG although they're way off. I'm in Oakland, not LA:

http://whatismyipaddress.com/ip/69.181.96.244
> > To unsubscribe from this group and all its topics, send an email to mailchimp-api-di...@googlegroups.com.
> > To post to this group, send email to mailchimp-...@googlegroups.com.
> > Visit this group at http://groups.google.com/group/mailchimp-api-discuss.
> > For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "MailChimp API Discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/mailchimp-api-discuss/uvYjuBE2IUE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to mailchimp-api-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages