Game Design, Programming and running a one-man games business…

Fun with cookies

For a long time I’ve been painfully aware about how much my purchase tracking sucks, due to the following reasons:

  • Google analytics tracking across domains (buy page site and main site) sucks.
  • A lot of people buy from steam, or elsewhere anyway, and I can’t edit those buy pages to add tracking.

I’ve finally started basic attempts to put in place a more robust system, which much more accurately tracks ad-clicks (or other link data, theoretically) to confirmed sales. The procedure is essentially this:

  • Direct adverts to a php version of the page, not html
  • Have that ad pass in a url variable to indicate the source (or theoretically just grab the referrer)
  • The php then stores that data in a cookie

When a purchased copy of the game runs for the first time, it finds the cookie (this bit is tricky) and then pings my server to say ‘advert #3323 just resulted in a sale’. This is all done anonymously, so there is no user tracking, just an indication that there was a confirmed sale, rather than just crossing my fingers. If the customer blocks the game from contacting the server, that no big deal, but my last 2 games have some online features, so it’s unlikely.

It will be a while before I have any actual  data to show for this, but it should make for less random marketing decisions once I have some, and I’ll share what I have learned. Many thanks to cas for prompting me to do this stuff :D


5 thoughts on Fun with cookies

  1. That is interesing. So the game will probe the cookie folder (or sqlite database in the case of FF) and look for your cookie.

    Given that cookies are used to hold session information for websites (keep me logged in), this behaviour might be seen as malicious by anti-virus / anti-spyware apps, or by people if they weren’t aware you were doing it.

    FF changed their cookie format a while ago, which could happen again I suppose, so future proofing this approach will be fun!

  2. Indeed, if a game decides to randomly probe chrome (or indeed anything else) when I don’t expect it to (such as opening a webpage), I get extremely suspicious and block such actions.

  3. I was wary of this too, but apparently no programs seem to flag it as suspicious, and also apparently, it is quite common, which did honestly surprise me. I thought you would have to set special flags on a cookie to allow it, but apparently not. No web pages get opened, and the browser isn’t opened, just a file read

  4. How about asking people when they use the game where they got it from. Does not have to pop up in an annoying way – if it can be accessed from the main menu, most players will probably find it eventually. Offer them some free content if they do it. You won’t get 100% complete data, but it will probably let you track non-legal sources as well.

    Eg. I got the game from…
    x – a shop
    x – steam
    x – pirate bay
    x – a friend

  5. The trouble is, I don’t want to know where they bought it, but where they heard about it, and many people will not be able to (accurately) remember that.

Comments are currently closed.