Now updated with Universal App support!


The Problem with Ratings

It’s no secret that apps with higher ratings (and more of them) receive better placement in the store. Better placement means more downloads, and more downloads means more money. But part of the problem with ratings is that people rarely think about doing them. And when they do, it’s usually because they’re either really satisfied or really dissatisfied. InfoSurv, a company that provides market services to companies like CocaCola, Nestle and Emerson, has this to say in their FAQ:


There is a observed response bias in customer satisfaction surveys towards the customers on either extreme of the satisfaction scale, particularly those who are very dissatisfied. In other words, very satisfied or dissatisfied customers are more likely to respond to a survey invitation than those more towards the middle. The best way to combat the resulting “polarization” of customer survey data is to assure the maximum survey response rate possible, thus capturing more of the ambivalent customers and making the customer survey responses more representative of the overall customer base.
 

So as app developers we have to solve two problems: 1) Getting more users to rate our apps and 2) Finding happy customers.

 

Solving the Rating Problem

Obviously it doesn’t make sense to ask someone for a rating on the first application run – the user wouldn’t know what to say! On the other hand, if a user continues to use an app over time we can infer that they’re getting value out of the app. Therefore it’s repeat users who we want to ask for ratings.

 

With that in mind, a rating reminder should:

 

  1. Keep track of the number of times the application has been run. - It helps us find happy users.
  2. Keep track of whether the user has already been asked to rate the application. - So we don’t keep bugging them if they’ve already rated or said they don’t want to rate.
  3. Bonus: Keep track of the number of days since an application was installed. - Valuable for short-lived or seasonal applications. For example, a Christmas application might want to remind after two days regardless of usage since after December 25th they won’t use it again for a year.
  4. Bonus: Have the ability to display the reminder in the local language. - Important for applications that support multiple languages.

 

The code to implement these features isn’t overly complex but it does involve several components (storage, dialogs, marketplace APIs, localization, etc.). It’s also boilerplate – meaning it’s the same across applications. That makes it a great candidate for being factored into a library.

 

App Promo

App Promo is a tiny control library for Windows Phone and Windows 8 created to help with promoting applications. Right now it contains one control – RateReminder – and by now you probably have a good idea of what it can do for you.

 

RateReminder has four main properties:

 

 

As you can see, RateReminder is configurable but its default settings mean you can drop it on your main page and forget about it. And since App Promo is available as a NuGet package, there’s no reason not to add it to your app today!

 

Using App Promo

Let’s take a look at how to add App Promo to a project. I’ll be showing App Promo for Windows Phone, but the steps are the same for Windows 8.

 

  1. Before we get started we need to make sure you have NuGet installed. In Visual Studio click on Tools –> Extensions and Updates. If you see NuGet in the list you’re already set. If not, type NuGet in the search box and install it (a restart of Visual Studio will be required).



  2. Next we need to install the App Promo NuGet package. You can do this through the Package Manager Console but I prefer to use the GUI. In Solution Explorer, right-click on your project and choose ‘Manage NuGet Packages’.

  3. Make sure the ‘Online’ branch is selected on the left and type ‘AppPromo’ (no spaces) in the search box.


     
    NOTE: App Promo is now a single package. Be sure to select the one that says "for Windows Phone and Windows 8"
  4. Click the ‘Install’ button next to App Promo and when the installation completes, close the NuGet window.

    NOTE: App Promo has been added to your project but NuGet can’t add the control to your toolbox. We need to do that before you can drop it on your page.
  5. Expand the toolbox if it’s not already expanded, then right-click and select ‘Choose Items…’. In the window that pops up, click the ‘Browse’ button.
     

  6. Navigate to your project folder, then to packages –> AppPromo.#.#.#.# –> lib –> wp8 (or netcore45 or wp81a for Windows Phone universal).
  7. Double-click on AppPromo.WP8.dll (or AppPromo.winmd) and click OK. The RateReminder control should now appear in your toolbox.



  8. Drag the RateReminder control onto the first page of your application (this is usually MainPage.xaml or GroupedItemsPage.xaml).

    NOTE:
     The RateReminder control is completely transparent and has no appearance. You’ll want to remember where you placed it or use Xaml view or Document Outline if you need to select it.
  9. Optional: Change the number of runs (default 7) or the number of days (default 0 – disabled).
  10. You’re done! You just added a rating reminder to your application.

 

Testing the RateReminder Control

Testing the RateReminder control is easy. Just remember that the application has to be closed and re-launched in order to be considered a “run” (otherwise the user is just fast switching). In Visual Studio you can quickly simulate a close and a re-launch using the Restart button:

 

 

If you don’t have Visual Studio attached you can use the phones hardware Back button to leave the app and then launch it again. For Windows 8, use the Reset button above or drag the window to the bottom of the screen to close the app between runs.

 

Important Note!: On Windows 8.1 apps are not actually closed unless you hold them at the bottom of the screen until they flip over (about 3 seconds).

 

After 7 runs (or however many you configured), the rating reminder will be shown:

 

 

 

Tapping OK will display the rating page if the application is already in the store. Otherwise, you’ll see an error message telling you that the application is not currently available.

 

Usage Statistics

RateReminder provides a small amount of usage statistics through the TryReminderCompleted event (if run automatically on load) or through the asynchronous result returned from TryReminder (if called manually). Both return an instance of the RateReminderResult class, which provides the following usage statistics:

 

 

The source code includes a sample that displays usage statistics. It’s important to note that the counter will read zero after the reminder has been shown. This is to avoid the cost of reading and updating settings after the reminder has been displayed.

 

The counters can be reset by calling the ResetCounters method on the RateReminder control. This will cause the reminder to be displayed again, which may be desirable after the application has been upgraded to a new version.

 

Localization

App Promo has been translated into more than 35 different languages, but it’s important to know that your app must also be localized for these languages to be shown. This is because the resource loader tries to be as efficient as possible. For example, when your application is run on a device set to Spanish, the resource loader will look for Spanish resources in your application. If it doesn’t find them, it won’t continue to look for Spanish resources when it loads the App Promo library.

 

Localizing your application is beyond the scope of this article, but as soon as your app is localized App Promo will show up as localized too. By far the easiest way to localize your application is using the Multilangual App Toolkit. This article is one of the best written guides I’ve found, and the Introduction and Testing videos are both excellent resources for getting started quickly.

 

Finally, if you see a translation error please feel free to create a pull request and fix it yourself or submit an issue with the corrected translation. Thanks!

 

*NEW* WinJS JavaScript Support

Starting with version 1.0.0.5 in NuGet, AppPromo now supports WinJS JavaScript projects! JavaScript + HTML projects don't support drag-and-drop controls like the XAML projects do, but adding AppPromo is still quite easy.

After adding the NuGet reference, open the JavaScript file for the main page of your project (usually default.js) and find the following line of code:

 

 

JavaScript
Edit|Remove
args.setPromise(WinJS.UI.processAll());
 
Now change that line of code to:
JavaScript
Edit|Remove
args.setPromise(WinJS.UI.processAll().then(function () 
{ 
    // Create the reminder helper object 
    rate = AppPromo.RateHelper(); 
 
    // Try to show the reminder 
    rate.tryReminderAsync(); 
})); 
 
If you would like to change any of the default values, like the number of runs before the reminder is shown, you can do so like this:
JavaScript
Edit|Remove
args.setPromise(WinJS.UI.processAll().then(function () 
{ 
    // Create the reminder helper object 
    rate = AppPromo.RateHelper(); 
 
    // Say we only want to wait 3 runs instead of the default 7 
    rate.runsBeforeReminder = 3; 
 
    // Try to show the reminder 
    rate.tryReminderAsync(); 
}));

And if you want to track any of the usage statistics, you can read them like this:

 

JavaScript
Edit|Remove
args.setPromise(WinJS.UI.processAll().then(function () 
{ 
    // Create the reminder helper object 
    rate = AppPromo.RateHelper(); 
 
    // Say we only want to wait 3 runs instead of the default 7 
    rate.runsBeforeReminder = 3; 
 
    // Try to show the reminder 
    rate.tryReminderAsync().then(function (result) 
    { 
        // Show the results on the page 
        numDays.innerText = result.days.toString(); 
        numRuns.innerText = result.runs.toString(); 
        reminderShown.innerText = result.reminderShown.toString(); 
        ratingShown.innerText = result.ratingShown.toString(); 
    }); 
}));
 

The attached source code and the source code on GitHub have been updated to include a JavaScript sample.

 

*NEW* Universal App Support

Starting with version 1.0.0.9 in NuGet, AppPromo now supports Windows Universal apps.  Be aware that there are actually two separate binaries, one for the Windows Phone 'head' and one for the Windows 8 'head'. This is because AppPromo needs to use different counters per platform and there is no API (or the author hasn't found one) that can be used to determine which platfor the code is running on. Without separate counters, as soon as the reminder is shown for the tablet version of the app, the reminder would never be shown on the phone version (or vice versa).

If you are using the NuGet packages, referencing the correct WinMD file is already taken care of for you.

 

Source Code

The source code for App Promo at the time this article was published is attached. However, it's highly recommended you check for the latest source on GitHub. Don’t forget that App Promo is already ready-to-use on NuGet, and here is a direct link to the Nuget Package.

 

Special Thanks

I’d like to extend a special “Thank You” to my co-worker and friend Paul DeCarlo. Paul created the NuGet packages for App Promo and he’s got a lot of experience when it comes to marketing Windows Phone and Windows 8 apps. I highly recommend you check out his blog post on Monetizing your app with AdRotator.