Game rating

You can ask users to rate your game and write a comment in a pop-up window (it appears when you ask for the game to be rated, overlaying the app background). The pop-up window isn't displayed to logged-out users or those who rated the game before.

Before asking for a game review, make sure that this option is available for the user.

Check whether the rating option is available

To find out if you can request a rating, use the ysdk.feedback.canReview() method.

The method returns a Promise<Object> that changes its state to resolved. The returned object contains the value key set to true/false, which you can use to see whether a rating request is possible:

  • value: true: You can request a rating.

  • value: false: You cannot request a rating. The reason for rejection is returned as a string in the reason key:

    • NO_AUTH: The user is logged out.
    • GAME_RATED: The user has already rated the game.
    • REVIEW_ALREADY_REQUESTED: The request has already been sent, not awaiting the user's action.
    • REVIEW_WAS_REQUESTED: The request has already been sent, the user has taken action by either rating your game or closing the popup.
    • UNKNOWN: The request couldn't be sent, an error occurred on the Yandex side.

Rating request

Alert

You can only request a rating once per session. You must use the ysdk.feedback.canReview() method before executing the request.

To ask the user for a rating, use the ysdk.feedback.requestReview() method.

The method returns a Promise<Object> that changes its state to resolved. The returned object contains the feedbackSent key set to true/false value, which you can use to see whether the user has rated the game (true) or closed the pop-up window (false).

If you ignored the ysdk.feedback.canReview() method before executing the request, the value feedbackSent: false may result in the use canReview before requestReview error.

Example of a game rating request

ysdk.feedback.canReview()
        .then(({ value, reason }) => {
            if (value) {
                ysdk.feedback.requestReview()
                    .then(({ feedbackSent }) => {
                        console.log(feedbackSent);
                    })
            } else {
                console.log(reason)
            }
        })

Note

Our support team can help publish finished games or WebApps on Yandex Games. If you have any questions about development or testing, ask them in the Discord channel.

If you are facing an issue or have a question regarding the use of Yandex Games SDK, please contact support:

Write to chat