How can I generate 1,000 one-time-use codes for my website?
March 3, 2007 8:05 AM   Subscribe

So I'm releasing a full-length CD on my brand new record label. And with it, I want to offer a bonus, download-only live EP available to those who purchase the full-length. How the hell am I going to pull that off?

We're pressing 1,000 copies of the CD. As far as I can tell, I need to:

1. Generate 1,000 unique, random sequences of numbers and/or letters, preferably both.

2. Print these sequences onto 1,000 copies of the CD booklet (one per booklet, obviously). I work at a copy shop, and we'll be printing these there. I think I have a handle on how to pull this off, but just for the record, the booklet is being built using InDesign.

3. (and this is where I'm completely outside my field of knowledge) Build something into the label's website that would check the sequence a visitor enters against our list, grant or deny access to the files accordingly, and then delete matching sequences from our list after they've been entered once.

Like I said, I think I have a handle on 2, and I can't imagine that 1 could be too hard to accomplish. Your answers to 3 will probably make no sense to me, and that's fine. They'll be supplied to the person building the website.
posted by 2or3whiskeysodas to Computers & Internet (19 answers total) 4 users marked this as a favorite
For step 3, you don't want to invalidate a key immediately, in case of technical or user error. Set a datestamp on the key's first use and invalidate it after a short timelag: either a couple hours or a couple days. Also give yourself a way to re-validate a key.
posted by ardgedee at 8:17 AM on March 3, 2007

There are lots of ways of accomplishing this in a Web site. Particulars of method depend largely on the Web server platform and the site developer's experience and skillset. Describe your issue to the person building your Web site, as you have here, and if they are competent, they should be able to supply a straightforward solution on any platform.

Roughly, they'll provide a "Free Offer" page which will have a form in which visitors will supply the string numbers you provide from the booklets. Upon submission, the form page will invoke logic on the Web server to query a database, or at least a flat file, return a new page with an access link, or an error page if the string has been used or is in error, and then do the database or file update, if you want to immediately cut the availability of the file. You probably want the download link to work for some reasonable period, like 7 days, in case the person trying to download has problems doing so the first time.
posted by paulsc at 8:24 AM on March 3, 2007

I'm not sure you want to invalidate a used key at all. What's the concern with allowing them to download more than once? Anyone that they're going to share the key with, they can easily share the files themselves with.

For 3, I would use a MySQL or similar database (if you're going to be doing this with other albums or with thousands of pressed discs) or, for a one-off, just an ordinary file listing the valid codes that the Web site programming simply opens and reads through.
posted by pocams at 8:25 AM on March 3, 2007

3 is pretty trivial for anyone with even a smattering of database experience. You could do this in almost any language (php, ASP, Perl, python, ruby, ...) It would be nothing more than a table containing the codes, a front end that accepts a request for a code, validates it against the list, and sends the file(s). Just include a timestamp column, and then when each download code is activated for the first time, record the timestamp. Then when checking for validity you can allow a window of time, say a few hours (or maybe even 48 hours) in which the downloader can access the files, to compensate for technical difficulties. Optionally add an IP column so that once initiated, only that same IP address can download with that code in the given time window. (I recommend not doing this, if you can avoid it, because it will screw with people that unknowingly access the web through a pool of transparent caching proxies, such as all AOL users and many corporate users.)
posted by Rhomboid at 8:26 AM on March 3, 2007

Given pocam's axiom ("Anyone that they're going to share the key with, they can easily share the files themselves with"), why not just make a non-linked page on your server, use .htaccess to ask for a simple user/password response and just point all buyers to that page?

No need for unique identifiers, just print the url and the name/password on the inside of your CD somewhere. The only reason I can see for wanting to set up unique access codes is if you want to track your customers one by one.
posted by Aquaman at 8:31 AM on March 3, 2007

But that axiom only takes into account the possibility of sharing the files, not the ease. It is a whole heck of a lot easier to simply paste a URL with a code on a forum or messageboard (or digg, or ...) than it is to actually provide the bandwidth to send the same files to dozens or hundreds of users.

And I think part of what 2or3whiskeysodas hopes to achieve is an incentive to be one of the first 1000 to buy this product and receive this value added material. If it was available universally there would be no incentive.
posted by Rhomboid at 8:56 AM on March 3, 2007

It is a whole heck of a lot easier to simply paste a URL with a code on a forum or messageboard (or digg, or ...) than it is to actually provide the bandwidth to send the same files to dozens or hundreds of users.

No, it really isn't. Rapidshare, mediafire, bittorrent, $8 1TB Dreamhost accounts: it's completely trivial to share large piles of data these days.

Decide whether or not you really want to send the message "I expect you to steal from me" to your customers, and decide whether or not them sharing the downloads is going to stop people from buying your CD in the first place. My hunch is that both is a "no".

(Honestly, getting people to "illegitimately" share the "limited-edition" EP to get people to buy the full-length album seems like good marketing to me.)
posted by mendel at 9:00 AM on March 3, 2007

another simple htaccess solution would be to make ~100 user/passwords, and disable one if it overwhelms your site.
posted by fake at 9:17 AM on March 3, 2007

Best answer: What is your goal here? To reward the first 1000 buyers of the CD?

If that's the main goal, that I'd think it would just be cheaper and simpler to make 1000 copies of the bonus CD and include it in the package.

If the goal is to bring people to your website and/or build a database of potential customers? Then just let anyone download it for free provided they provide a valid e-mail address. You can probably limit your bandwidth costs to a couple cents a download, which is pretty cheap as marketing costs go.

If you do offer a downloadable version make sure that it is well tagged because if anyone actually likes the music, it's going to travel. Include album art with your URL. Make sure the artist information is filled in, and put a URL in the info field. Check your tags on a few different media players (iTunes, Windows Media, WinAmp, RealPlayer).

I helped Harvey Danger do the online release of their 3rd album and I've thought through a lot of these issues. e-mail in my profile if you want to discuss.
posted by Good Brain at 9:36 AM on March 3, 2007 [1 favorite]

I have to agree with Mendel:

Honestly, getting people to "illegitimately" share the "limited-edition" EP to get people to buy the full-length album seems like good marketing to me.

If bandwidth costs are a concern, do make a 100 keys, and come up with a simple, generous cap of how many times a key can be used to download a file. When the cap is exceeded, redirect the browser to the web page telling visitor how great the full abum is.

And if you want it to look nice, do not use .htaccess. The basic auth prompt looks ugly and intimidating (to a non-technical user) in all browsers. I'd spend a little more effort to have a nicer UI - a page which tells the user how great your album is (see above) and has a prominently displayed area to type in their unique key for additional material.
posted by blindcarboncopy at 9:38 AM on March 3, 2007

Speaking as someone whos put out a good number of small run releases, I'd say this is a waste of time/energy.

If you're only pressing 1000 records, getting the maximum amount of exposure is key. I think you're a lot more likely to entice people to buy the record because they heard the free live EP and liked it, than to get people to buy the record cause they can download a live EP.

the suggestions made by good brain are... good. haha
posted by teishu at 9:50 AM on March 3, 2007

If bandwidth costs are a concern, consider using amazon S3. It's pay as you go & $0.20/GB transferred. A 50MB zip of high quality MP3s would be $0.01/download. I'm guessing that if you got 100k downloads, you'd be thrilled out of your brain, and it'd only run you $1000.

You could probably get something even cheaper from some budget shared hosting service. Either way, host your main website separately from the downloadable files.
posted by Good Brain at 9:54 AM on March 3, 2007

1. There are tons of websites that can generate (relatively) random sequences for you, but you should think about how difficult these sequences will be from an input standpoint. You don't want the user to experience any barriers when they enter their code, so you should ensure the codes are easy to read, and try to eliminate potential confusion. A lowercase "L" may look like a "1" depending what font your designer is using, so it would probably be smart to stick to, say, all uppercase letters. (And say that on the input form.)

Another option to eliminate confusion are dictionary words. If you remember from all those old "free access" disks, AOL would generate human-readable word codes so their potential users could remember them easily. Things like "car-trouble" or "baseball-rules." This could be accomplished pretty easily through some programming logic and a list of "real" words. "Real" words are easier for people to remember than "ioadsasd."

If you don't want to put the time into something like that, you could just find an online generator. I use this password generator quite a bit -- it will allow you to set different lengths and levels of strength, from difficult-to-remember "$%,p]@" to more understandable strings like "YKNSAD."

2. InDesign works well with XML, so if you format your codes properly, your designer can input the data into InDesign and generate the unique pieces automatically instead of manually copying/pasting each code into the proper place. I haven't read this article, but it was the first one I found on a Google search that looked like it could apply to your needs: Adobe's InDesign and XML. There are plenty more if you do a search for InDesign and XML.

3. As others have said, this is a pretty basic programming project for those experienced in PHP/MySQL. And like others have mentioned, removing the codes from the database really serves nobody any good. You can certainly disable or invalidate (mark as flagged or something), but all that data is extremely valuable -- it's the kind of data you'd pay someone to gather for you (don't squander it!). Add a timestamp into the mix, and suddenly you can analyze the average response rate. Add an IP address field, and you can get an idea of where your users/customers are coming from (i.e. where to tour). That's all stuff you can gather on your own just by using that one code. (You'll want to add a privacy policy disclosing what info you're gathering).
posted by Hankins at 9:56 AM on March 3, 2007

I would agree with GoodBrain on this one. It would be far easier to just press 1000 "special edition" cd's that include the extra EP track than it would be to go through all the technical mumbo-jumbo of making it downloadable. (unless of course your goal is to drive people to your website)

No matter how you do it, that extra EP track is going to get out on the file sharing networks eventually, so trying to secure it is a waste of time and energy.

What I would do is create 1000 "special edition" CD's that include the extra track, special cover art and some other "extra's" to entice people...
posted by jmnugent at 10:09 AM on March 3, 2007

I'm with the people who asked, what are you trying to accomplish here?

I think there are several things you can want to do here:

b) provide an exclusive bonus for the first thousand people to buy your CD
c) attract people to to your website, where you want them to come and visit and build a community

a) is by far the most important and most beneficial. b) can only be accomplished by providing a different physical product - anything you provide electronically can be shared electronically, and there's nothing you can do about it. c) is useful if and only if you actually have a good website that people would want to return to and spend time there.

So for b), you want to press different CDs. CDs can hold 74 minutes of audio. You press your CD with 15 tracks instead of 12, mark the last 3 "bonus tracks", and tell people that after the first 1000 are sold, future discs will only have 12 tracks on them. Different physical product. The last 3 will still be shared electronically - but you won't have the CD with them on it if you didn't buy it early.

For a), you want to encourage sharing of your music as much as possible. Really. Your music is NOT going to be played on Casey Kasum's top 40 countdown. It's not going to be played on Q105 in heavy rotation. Your only avenue for exposure is getting it out there through the magic of the internet. Let them download the whole album, so they don't have to rip it themselves. Make sure the mp3 metadata for your downloaded files is correct and points back to you - so that when random people hear the mp3, they can find your website and buy the disc.
posted by jellicle at 10:10 AM on March 3, 2007

I'm pretty much just chiming in to agree -- 1,000 is a relatively small "pressing," where you could just bundle the EP with the first thousand discs shipped. If it's a touring band, you could have the EP exclusively available at shows first, and then available as a download later. It just sounds like a lot of work and resources to first generate a login / code and then to print them seperately on the physical product. Although, this is how Wilco did it ... but, they're Wilco.

At my label, we've had a lot of success doing free downloads at Emusic ... it usually charts in the Top 10 for awhile, putting it on the front page, and (hopefully) exposing Emusic subscribers to artists they might've never heard before (I know that's my nature as user -- I look at what everyone else is downloading when looking for new music). People love free stuff, why not give the EP away, and turn them on to the full-length?
posted by pfafflin at 12:14 PM on March 3, 2007

Rather than print the code on the booklet it might be easier to generate a thousand inserts with separate codes and put one of each into the first thousand packages.
posted by caddis at 12:53 PM on March 3, 2007

Not to be a party pooper, but the vast majority of DIY bands/labels who press 1,000 CDs end up with 925 of them gathering dust in someone's attic. You might consider putting your time and effort into promotion instead.

That said, one similar thing that a band did that I personally thought was cool was to package two copies of their CD in the jewel box, with a note saying "if you like it, please give one to a friend." A friend of mine passed a copy to me for that very reason, and I ended up buying my own and doing the same. The original peer-to-peer file sharing network, I guess?
posted by spilon at 9:17 PM on March 3, 2007

With my first EP, I just printed a password on the insert, which allowed people to log in to a special page at the website and claim the extra stuff at any time. This also allowed people to share the access with friends, which spreads the good vibe of "I'm getting special treatment."

In addition to audio files you might want to include something on the page that typically can't/won't be downloaded. Maybe some video, or a tiny message board or shoutbox where people can leave a message once they've logged in and see who else has done it. IOW, build a tiny (if fleeting) community around your release. Give people a reason to use the code instead of just searching a P2P network for the free stuff.

Also, what jellicle said: track and analyze the logins; you can learn a lot about how well your experiment is performing.
posted by scottandrew at 1:08 PM on March 4, 2007

« Older What can I do about a manager who creates a toxic...   |   I want to be a good substitute teacher Newer »
This thread is closed to new comments.