We Know Where You Fucking Live

Emailing 25k Marilyn Manson fans a video of their house

Monday, we emailed 25,000 Marilyn Manson fans a video of their house in support of his new single, “WE KNOW WHERE YOU FUCKING LIVE.” The campaign itself is still working it’s way through the fanbase but here’s a few snap reactions.

I’ve always been a fan of personalizing content and making campaigns feel intimate. When I heard the title of the track, I knew exactly what we were going to do but getting there required a lot of smart technology and one heroic 2012 MacBook Pro.

Read on to find out how we developed this experience.

Data

We were fortunate to have a bit of past purchaser data from our online store but the bulk of this data was pulled from a simple contest page. Contestants were required to give their email address and share their location in order to earn a chance to win tickets to see Manson live at a show near them. The HTML5 Geolocation API provides both a convenient way for a user to share their location and a highly accurate (latitude and longitude) representation of where they are.

Satellite Photo

Both Google and Mapbox have static Map APIs which allow you to get an image of any location simply by providing a set of coordinates. I went with Mapbox because their service is awesome, beautifully written, and well documented. We also used it on the contest page to create a dot density plotting of all contestants.

Now before you go downloading 25,000 photos to turn into videos, you’re going to need an additional commercial license with Mapbox for your use case. If you have any questions regarding this subject, Paul Goodman at Mapbox is your man. Once you’re legally allowed to do this, write a simple node script to pull images. You’ll want to do this in chunks so you don’t hit the API limit on calls.

var users    = require('./users.json');
var token = process.env.MAPBOX_TOKEN;
function url(lon, lat) {
return "https://api.mapbox.com/styles/v1/mapbox/satellite-v9/static/" + lon + "," + lat + ",17,0.00,0.00/960x960?attribution=false&logo=false&access_token=" + token
}
var i = 0;
function downloadPhoto() {
var user = users[i];

var photo = fs.createWriteStream('photos/' + user.id + ".jpg");
  var request = https.get(url(user.lng, user.lat), function(res) {
res.pipe(photo);
    if (i < users.length) {
downloadPhoto();
      i++;
}
}
}
downloadPhoto();

Once all of the images are downloaded, I ran an Image Magick task to convert them all to grayscale.

mogrify -type Grayscale photos/*

In addition to Paul Goodman, I have to thank Paul Veugen from Mapbox who came to my rescue on Twitter in the final moments of the campaign while having fried tomatoes for dinner with his family. If the curiosity and kindness of their team is any indication, this company is bound for success. 🙌🏻

Automated Video

I would have to say this project wouldn’t have come about in the first place if I had not found Austin based DataClay. I’ve been curious about automating video creation for years and apparently these guys had developed a plugin for After Effects that could dynamically generate videos based on a huge range of variables. I actually emailed them long before this project and they sorted me out with a free trial which blew my mind. The YouTube tutorials alone are inspiring. Then as fate would have it, our Marilyn Manson campaign materialized.

DataClay is also a well documented piece of software so I won’t go into the grindy details of how it works. You should definitely check out their support and screencasts. In general, it’s a plugin you install on After Effects which allows you to feed in a data feed of dynamic information. In my case, all I really wanted to do was swap out a satellite photo and make sure the exported file name had the user’s id written into it.

My After Effects composition consisted of three layers:

  1. A 15 second clip from the track, trimmed so it would loop
  2. A satellite photo placeholder which rotates 360deg
  3. A transparent overlay image which included album info, crosshairs, attribution, and copyrights

Once DataClay was setup and pointed to both my data and directory full of photos, I was able to preview how each photo fit into the composition and began replicating thousands 😮 of videos into the Adobe Media Encoder.

Shout out to my 2012 MacBook Pro who took on the task of rendering all of these videos over a period of several days. I actually ran my AC as cold as it would go and sort of positioned the laptop in a clear path of the air so it wouldn’t catch fire. In the end, we were able to render about 3–4k videos a day. TBD on my AC bill.

Special thanks to Arie Stavchansky from DataClay for fielding all my questions. He even did the math of how long it would take to render my videos when I was freaking out over email. I’ve already used DataClay again on a Foo Fighters campaign and look forward to the next use case.

Once the videos were rendered, I commandeered my girlfriend’s computer to upload them to an S3 in preparation for sending.

Mailing

So we’ve got 25,000 unique videos files averaging about 6MB each and email addresses for each… how the hell are we going to mail all of these things in a fraction of the time it took to render them. Well unlike the rendering process, which was connected to a single (albeit now legendary MacBook) computer, we’re able to do email sending using the infinite capabilities of the web. I chose to use the lethal combination of Sidekiq and Postmark.

Sidekiq makes background processing simple and efficient. How do I know that? They said so on their website. Their system allows us to write a “worker” who initiates a “job” for each individual email send. These jobs are then added to a Redis backed queue system which, in my case, await Heroku worker dynos. At the peak of our send, I was running three performance dynos generating 120 threads. That’s the equivalent of 120 computers doing our evil bidding of sending emails. It took less than 3 hours to get all of these out.

The worker itself was a wrapper for the excellent Postmark application email delivery service. Unlike the bulk mailing systems of MailChimp or Campaign Monitor, Postmark has built a system for transactional email, like activation emails and password resets. I always considered our email send to be a slow confirmation email for entering the contest rather than a bulk marketing email. I was surprised to find Postmark had also added email templates which previously were such a hassle to handle in simple applications.

In the end, here’s all it took to download each video file and attach it to a templated email for sending.

client = Postmark::ApiClient.new(ENV["POSTMARK_TOKEN"])
response = client.deliver_with_template(from: 'manson@wkwyfl.com',
to: user.email,
template_id: 1234567,
attachments: [{
name: "WKWYFL.mp4",
content: [open("URL_TO_VIDEO/#{ user.id }.mp4").read].pack('m'),
content_type: 'video/mp4'
}]
)

At the moment, we’re well over 50% open rate for those 25,000 emails with only 5 spam complaints.🤞 I couldn’t imagine what someone is thinking if they received this on accident. 😅

Thanks to the Postmark support team (shoutout to Marek) for helping coordinate a successful campaign. I love these guys and also use their product on Unlock and Artwork.

Team Effort

This is now my 4th campaign with Loma Vista Recordings. The other three? Cut Copy. Little Dragon. And Local Natives. It’s safe to say that these guys empower creative thought and trust the plans of a mad scientist. Thanks to Adam Farrell, Rian Rochford, and team for fueling this concept. Additional thanks to Concord Music Group, and Caroline.

Last but not least, 90's Lee must thank the pale emperor himself, Marilyn Manson. What a perfect fucking client and a massive honor.

Heaven Upside Down is out October 6th.