Tracking your software downloads using setup filename

Measuring your marketing campaign is utmost necessary to determine the success of your campaign.

In order to measure, you need to track various factors. When you are selling a downloadable software, one such factor is the website from which your software was downloaded.

There are several software download sites where you can publish your software. Such as, softonic, softpedia etc. When someone purchases your software, how will you determine from which website he had downloaded your product? Very few websites have javascript based tracking methods. The disadvantage is that tracking is available only when you advertise on that particular download website.

Today I will show you one trick. The trick is to name the setup file name with a tracking code and track it till product purchase. I implemented this today for my sticky notes app – Notezilla.

Step 1:

If the setup file name is NotezillaSetup.exe, just suffix it with a code like NotezillaSetup(s101).exe

Step 2:

In the setup program that you use, parse the setup file name, pick the tracking code and save it in registry or an INI file during installation of the product.

I use Inno Setup. Here is the Inno Setup script I used to parse and save it to INI file during installation.

function GetDownloadSource(Param: String) : String;
setupFileName : String;
stringPos : Integer;
downloadSourceName : String;
  //The following code is to find the source of download file
  //from the file name itself. For example if the file name is NotezillaSetup(s100).exe 
  //then we will get s100 from the file name
  setupFileName := ExtractFileName(ExpandConstant('{srcexe}'));
  stringPos := Pos('(s', setupFileName);
  if (stringPos > 0) Then
       //+1 ignores ( character
       downloadSourceName := Copy(setupFileName, stringPos+1, Length(setupFileName)); 
       stringPos := Pos(')', downloadSourceName);
       if (stringPos > 0) Then
              //remove all characters after ) closing bracket so that
              //finally we get a string of within the () brakets
              Delete(downloadSourceName, stringPos, Length(downloadSourceName));
  Result := downloadSourceName;

In the INI file, now you used the above function GetDownloadSource

Filename: "{userappdata}\Conceptworld\Notezilla\Notezilla.ini"; Section: "General"; Key: "DownloadSource"; String: "{code:GetDownloadSource}";

Step 3:

In your software, you will have various locations where you take the user to your website. Like Buy Now button, Website button, Online Help.

You need to suffix the tracking code to all the urls that take the user to your website.


Old Url:
New Url:

Step 4:

Now modify your website code (client or server side) to read this tracking code and save it to cookie or session variable.

Step 5:

On your order page, take the tracking code from the cookie/session variable and append to your order urls. All e-commerce websites allow you pass additional data so that you can track your order. Configure your e-commerce server provider to save this additional data and send it to you on successful order completion. Usually it is through IPN (Instant Payment Notification).

That’s it.

You can see how useful this tracking method can be. You simply have to change the setup file name and provide a different url to the download website. This way you can plan your marketing strategies. Where to spend more money on advertisement, where you stop spending more money etc.

I hope you got an idea how to go about it. If you have any questions, please post them below in comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *