HomeAppVirality DocsAdvanced ConfigurationsDisplay Welcome Screen

Display Welcome Screen

Launching the welcome screen with due personalization at the right moment


The Welcome Screen is a novel feature loaded in the AppVirality SDK, something which you’d not find anywhere else. This is a proactive measure to enable an intensely personalized experience to the new users coming onto your app, via a Referral Invite.

You can greet such users (ones who discovered your app via a Referral Invite) with a personalized welcome screen, displaying:

  • Referrer Image
  • Referrer Name
  • Incentive Amount
  • Compelling Welcome message (configurable preset from AppVirality Dashboard)
    etc. as soon as they come onto the app & trigger the event (Install, Sign-up, etc.) upon which you’d define an on-boarding for the user.

By default AppVirality generates a compelling welcome message, based on your campaign configuration settings on Dashboard. You can change this default welcome message at any time in your AppVirality dashboard

Navigation:

Dashboard >> App Details >> Select Campaign >> Click More >> Landing Pages >> Scroll down to Configure In-App Welcome Message

This can be customized to display what you would like better in place of what the systems generate.

Welcome Screen Customization
Welcome Screen Customization

 

Now let’s explore the method of implementing the onset of the Welcome Screen in your app, in a contextual manner.

Implement the following code blocks in your Main Activity (recommended) to launch the Welcome Screen. We have broken the method into easily recountable steps for you.

 


The foremost check to run is whether the registering user is an existing user or not.

The Welcome Screen is tagged to the Installation event and facilitates the user’s onboarding by initiating the Sign-up activity, while proclaiming the incentive. This has been a crucial factor is increasing user sign-up conversions by over 45%. Hence this bridge between the Installation and Sign-up would need a validation, wherein you can successfully screen/filter off the existing users.

The below code block should enable your check on the user’s pre-existence:

  
import com.appvirality.AppVirality;

public class MainActivity extends AppCompatActivity {
  AppVirality appVirality;
  private static final int REG_SCREEN_REQ_CODE = 100;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    appVirality = AppVirality.getInstance();
    if(!appVirality.isExistingUser()) {
      showWelcomeScreen();
    }
  }
}

 

 


Inside the Welcome Screen launcher (i.e. method) you must run through a set of operations to ensure the right user & event are being mapped. This is critical as this would directly impact the rewards being distributed to the concerned stakeholders.

As it goes: 

  • Retrieve the Attribution Details from the SDK
  • Given all conditions for displaying the Welcome Screen are met, display the Welcome Screen.
  • Additionally set the New User as ‘Existing’ 
  
private void showWelcomeScreen() {
    appVirality.checkAttribution(null, new AppVirality.CheckAttributionListener() {
        @Override
        public void onResponse(JSONObject responseData, String errorMsg) {
            if (responseData != null) {
                String attributionSetting = responseData.optString("attributionSetting");
                if (!responseData.optBoolean("isExistingUser") && !(attributionSetting.equalsIgnoreCase("0") && !responseData.optBoolean("hasReferrer"))) {
                    Intent intent = new Intent(MainActivity.this, WelcomeScreenActivity.class);
                    intent.putExtra("referrer_details", responseData.toString());
                    startActivityForResult(intent, REG_SCREEN_REQ_CODE);
                    // Set the user as existing user after displaying the welcome screen, to
                    // avoid welcome screen getting displayed on subsequent launches
                    appVirality.setExistingUser();
                }
                
            }
        }
    });
}

Enter Referral Code
Enter Referral Code

You need to include this only if your app’s attribution setting is NOT Only Referral Link.

The above used checkAttribution() callback will return the possible referrer details if the user had clicked on the invite link before installing the app but in case user installs the app directly without clicking on the Referral Link first, we must ask him/her for the referral code to get the possible referrer details for showing the welcome screen.

Implement the above logic by including the following code blocks inside your Welcome Screen:

Display Welcome Message or Ask for Referral Code

 String attributionSetting = referrerDetails.optString("attributionSetting");

 // shouldEnterRefCode will be True if Referrer Details are not available, if
 // so take referral code from user to get possible Referrer Details
 final boolean shouldEnterRefCode = !attributionSetting.equals("0") && (!referrerDetails.getBoolean("hasReferrer") || appVirality.isSessionInitialized());

 if (attributionSetting.equals("0") || referrerDetails.getBoolean("isReferrerConfirmed")) {
    // Displaying Welcome Message if attribution setting is Only
    // Referral Link or Referrer has been confirmed
 } else {
    // If Attribution Setting is Only Referral Code or (Referral Link + Referral Code)
    // and Referrer is not confirmed
    if (referrerDetails.getBoolean("hasReferrer")) {
        // If user should enter Referral Code to get the Referrer Details
        if (shouldEnterRefCode) {
            // Ask the user to enter referral code, check using checkAttribution,
            // if correct display welcome message using its response
        } else {
            // Display welcome message with Sign Up button
        }
    } else {
        // Doesn't have Referrer Details, Ask the user to enter referral code, check
        // using checkAttribution, if correct display welcome message using its response
    }
 }

Welcome Screen
Welcome Screen

In case the user clicks on Signup, show the registration or signup screen as the welcome screen closes.

On Signup Screen once the user register successfully initialize the SDK and record the install and signup conversion events, as per your reward rules.

Meanwhile you must implement the following code snippets to ensure the concurrent activities are tied up together:

Sign-Up Action

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REG_SCREEN_REQ_CODE && resultCode == RESULT_OK) {
        Intent loginIntent = new Intent(MainActivity.this, LoginActivity.class);
        loginIntent.putExtra("referral_code", data.getStringExtra("referral_code"));
        startActivity(loginIntent);
    }
}

After successful Sign Up

UserDetails userDetails = new UserDetails();
// Set the user details using the UserDetails class's setter methods
            
appVirality.init(userDetails, new AppVirality.AppViralitySessionInitListener() {
    @Override
    public void onInitFinished(boolean isInitialized, JSONObject responseData, String errorMsg) {
        if (isInitialized) {
            if (responseData.optBoolean("isNewSession")) {
                appVirality.saveConversionEvent("install", null, null, null, Constants.GrowthHackType.Word_of_Mouth, null);
                // Uncomment the below line if you have reward on sign up
                // appVirality.saveConversionEvent("signup", null, null, null, Constants.GrowthHackType.Word_of_Mouth, null);
            }
        }
    }
});

 

Was this article helpful to you? Yes No 1