Asking your users for ratings with the market plugin

By Mike Roberts

Getting app feedback from your users can be like pulling teeth sometimes. The loud minority of unhappy users are usually the ones posting reviews, so your app rating is lower than it should be. One of the ways to overcome this issue is with a plugin that prompts the user to rate your app on the app store. The way this was typically done in Cordova apps was to install the cordova-plugin-apprate plugin, configure it and be all set. It pops up a native window after it’s triggered a configurable amount of times and that’s that. But there are a couple problems with this approach.

The first problem is that it’s poor UX and doesn’t work all that well. There are numerous articles out there that talk about this problem and ways to overcome it. Generally the solution is to passively ask for reviews in your content, in settings, and in unobtrusive places that won’t annoy your users.

The second problem, happens to be a problem because of the first problem. The app rate plugin just pops up a native window. You can’t really customize its behavior too much, so I guess that’s not really a solution to the issue of app ratings. Luckily there’s a newer cordova plugin where it’s sole behavior is to provide a function that you call that sends the user to the correct app store to your app listing so they can review it. You can build your own custom set of microinteractions, you can put it on the settings page, on a feedback page, you can make any behavior you desire and then call this function to take the user to the app store. This plugin is called Market, there is an Ionic Native integration for it so it’s super easy to use in your Ionic apps too.

Setup is easy:

$ ionic cordova plugin add cordova-plugin-market

Add to your app.module.ts file

import { NgModule } from '@angular/core';
import { Market } from '@ionic-native/market';

  providers: [
export class AppModule {}

Import and use in your component

import { Platform } from 'ionic-angular';
import { Market } from '@ionic-native/market';

export class SendToMarketComponent {
    private platform: Platform,
    private market: Market
  ) {}

  launchAppStore() {
    if ('android')) {
      // Use your app identifier for android.'');
    } else {
      // Use the id found in the URL of the ios app store listing.'id123456789');