Facebook privacy concerns?

In the introduction to Neil Postman’s Amusing Ourselves to Death, Andrew Postman wrote:

We were keeping our eye on 1984. When the year came and the prophecy didn’t, thoughtful Americans sang softly in praise of themselves. The roots of liberal democracy had held. Wherever else the terror had happened, we, at least, had not been visited by Orwellian nightmares.

But we had forgotten that alongside Orwell’s dark vision, there was another – slightly older, slightly less well known, equally chilling: Aldous Huxley’s Brave New World. Contrary to common belief even among the educated, Huxley and Orwell did not prophesy the same thing. Orwell warns that we will be overcome by an externally imposed oppression. But in Huxley’s vision, no Big Brother is required to deprive people of their autonomy, maturity and history. As he saw it, people will come to love their oppression, to adore the technologies that undo their capacities to think.

What Orwell feared were those who would ban books. What Huxley feared was that there would be no reason to ban a book, for there would be no one who wanted to read one. Orwell feared those who would deprive us of information. Huxley feared those who would give us so much that we would be reduced to passivity and egoism. Orwell feared that the truth would be concealed from us. Huxley feared the truth would be drowned in a sea of irrelevance. Orwell feared we would become a captive culture. Huxley feared we would become a trivial culture, preoccupied with some equivalent of the feelies, the orgy porgy, and the centrifugal bumblepuppy. As Huxley remarked in Brave New World Revisited, the civil libertarians and rationalists who are ever on the alert to oppose tyranny “failed to take into account man’s almost infinite appetite for distractions”. In 1984, Huxley added, people are controlled by inflicting pain. In Brave New World, they are controlled by inflicting pleasure. In short, Orwell feared that what we hate will ruin us. Huxley feared that what we love will ruin us.

Which is funny, because since the book was published in ’85, Neil Postman had to’ve been writing it in 1984! But is also terrifying, because look at the world.  Look at the news media.  Look at where the bulk of our time is spent.

Look at our brave new world.

MailChimp Autoresponder API stats

MailChimp’s API is great for getting/updating data about campaigns, lists, and users.  One would think that, because the API exposes so much campaign information, it would also be exposing autoresponder information, since they are just a type of campaign.

One would be sorely mistaken.

Recently, I needed to create a daily email report that would use MailChimp’s API to get the number of recipients for each autoresponder for that day.  It was going to be an easy project, up until I realized that MailChimp would let me access almost all of the information I needed – the campaigns, the segment criteria, the users – except for the information about who was going to receive the email that day.

This functionality is something that is offered on their site proper, though, so it is possible.  The “Who’ll Get This Next” link in the send settings of the autoresponder’s row on the autoresponder page will show who is going to get the email that day.  If no one fits the criteria for today, then the result set comes up empty, so “Who’ll Get This Next” should probably be called something like “Who’ll Get This Today,” but I’m not here to pick on their copy choices.

In any case, I needed to get the number of users who were going to receive an autoresponder sent out three days after they signed up for the newsletter, which meant I needed to figure out there signup date.  Because of the way the other merge vars were set up, it wasn’t clear which one of them was the signup date, or if any of them actually were.  (Read: I still have no idea.)

MailChimp’s API documentation is pretty great, and has examples for each function, but the examples don’t always cover every bit of available functionality, so it wasn’t until about the third time that I read the campaignSegmentTest function documentation that it finally clicked that the field ‘date’ they were talking about was the date a user signed up.  And, honestly, I found that whole section of the page kind of confusing at first, because the way the information was laid out didn’t make much sense to me.

But enough about my lack of reading comprehension.  For anyone else out there who is trying to figure out how to get the number of “Who’ll Get This Next” from their MailChimp autoresponder based on the signup date,  it turns out it is wicked simple.  My site is in PHP, so this is the PHP code to do it:

//This takes today's date in POSIX/Unix Time and subtracts three days from it, then converts that to a string in the format 'YYYY-MM-DD', which is the format that the date field for campaignSegmentTest requires.
$date = date('Y-m-d', strtotime('-3 days'));
//This creates a condition that the sign up date must equal the three-days-ago date just calculated
$signup_cond = array('field' => 'date', 'op' => 'eq', 'value' => $date);

This means that the full array to pass to campaignSegmentTest for a JSON call would look something like this:
  'list_id' => $the_list_id,
  'options' => array(
    'match' => 'all',
    'conditions' => array(

It seemed pretty dang complicated the first time I had to put it all together, but now I’ve started to get the hang of it… just as the project is ending.  I hope this helped someone else figure out how to get “Who’ll Get This Next” autoresponder numbers from MailChimp!