Track Referrals
Reward your players for referrals and grow your business

Introduction

One of the most effective ways to get new users is through user referrals. You can use Gameball referrals capabilities to encourage your users to invite their friends by offering rewards for successful referrals to both the referrer and the recipient.
Gameball referrals uses Firebase Dynamic Links in the background to generate players referral links and track referrals. Dynamic Links are smart URLs (deep links) that survive the app install process, so new referred users via referral links will be easily tracked when they open the app for the first time.
Gameball and its SDK provides hassle free integration to track referrals where you will only need to
    1.
    Provide your firebase info through Gameball dashboard to generate referral links to your players
    2.
    Invoke referral method with every new account creation through your app.
Your players will be able to get and share their referral link from Gameball Player Widget
Tracking referral requires Firebase and Firebase Dynamic Links SDKs installed into your app.

Integration Steps

To integrate and track referrals you need to perform two main steps
    1.
    Configure your Firebase dynamic links settings from your firebase console
    2.
    Configure Firebase on your App and Gameball account dashboard
    3.
    Invoke SDK Referral method within your App user registration flow

1. Firebase configuration

    Add the firebase dynamic links dependency in your project
1
implementation 'com.google.firebase:firebase-dynamic-links:17.0.0'
Copied!
    In your manifest file add an intent filter in the activity that handles the deep links
1
<intent-filter>
2
<action android:name="android.intent.action.VIEW"/>
3
<category android:name="android.intent.category.DEFAULT"/>
4
<category android:name="android.intent.category.BROWSABLE"/>
5
<data
6
android:host="example.com"
7
android:scheme="https"/>
8
</intent-filter>
Copied!
For more information check Firebase Docs

2. Invoke SDK Referral method

addReferral SDK methodThis should be called after your user registration, hence a new player is created. It basically detects if the user has registered using a referral code or not. Generally, it should be called in the onSucess for registerPlayer method.

addReferral(Activity activity, Intent intent)

    In your manifest file add an intent filter in the activity that you are going to call addReferral
1
<intent-filter>
2
<action android:name="android.intent.action.VIEW"/>
3
<category android:name="android.intent.category.DEFAULT"/>
4
<category android:name="android.intent.category.BROWSABLE"/>
5
<data
6
android:host="example.com"
7
android:scheme="https"/>
8
</intent-filter>
Copied!
Last modified 2mo ago