Skip to content

Monetization Platform userId Setup ​

This API is only available for products integrated with the ironSource monetization advertising platform.


Description ​

Some products integrate the ironSource monetization advertising platform. To facilitate ad data statistics, call the ironSource API for setting the userId in the callback after login succeeds.

Get the User object from the onLogin callback of the Login(required) API, then get userId from the User object. For details about the User object, see User Class.

Call changeUserId only after ironSource has been initialized successfully and the userId has been obtained after successful login.


Example Code ​

java
GDSDK.gamedreamerLoginV2(this, new GamedreamerLoginListener() {
    @Override
    public void onLogin(User paramUser) {
        String userId = paramUser.getUserId();
        IronSourceAdQuality.getInstance().changeUserId(userId);
    }
});