Add “Rate my App” to your Ionic App [v3]

ionic-rate-my-app-header

You think your app rocks but your users are not leaving any reviews? Perhaps you just need to give them a little kick in the right direction so you can increase your app store ratings!

In this Quick Win we will integrate the “Rate my app” plugin to kindly ask our users to rate our app inside the app store with just a few clicks. Once we are done our result will look like below but of course you would open a different app than that!

ionic-rate-my-app

Setting up the App

We start with a blank app and won’t add much besides the plugin, so go ahead and create the app and install our Cordova plugin and the according Ionic Native NPM package:

Make sure you load the new plugin right inside your src/app/app.module.ts:

That’s all for the setup phase in general.

Now is also a good idea to grab the ID of your app from the iOS and Android app store. For iOS, simply go to your iTunes connect entry of your app and copy the Apple ID, which is also most of the time inside the URL to the store which is in the block General Information..

For Android it’s simply your bundle ID that we need, so you should already have /know that one from your config.xml

Adding Rate my App

Now we can actually make use of the plugin. We can use it in 2 different modes:

  • Always and immediately ask for rate
  • Ask only after opening app a few times

In the example I passed true to promptForRating() in the end which will make it appear all the time, so simply remove that if you want to use the other stuff you specified before.

Actually there are quite a few things we can set on this plugin, most important is of course the ID to your iOS and Android app, otherwise the plugin can’t open the app store with the right app!

The other options are more or less optional, but it totally makes sense to wait until the users has used your app a few times before you ask him to rate your app!

Go ahead and open your src/home/home.ts and insert:

As you can see we can also change the texts of the rating popup or connect a callback to the buttons so we could internally do some other stuff if we want to.

Now add this super simply feature to your app and let me know if you at least got a few more ratings for your awesome app!

You can find a video version of this article below.