A GUIDE TO IMPLEMENT A REFER A FRIEND PROGRAM

At Genius Referrals, we knew from the start that we needed to implement our referral marketing program to increase our customer acquisition through referrals. Referrals marketing programs are crucial to acquiring new loyal customers and increasing sales. That's why we have created our refer-a-friend program using our SDKs and decided to put together a use case so that you can learn how to implement your own. You can see our live referral program on this link.

The Problem:

Because most marketing tools (TV ads, radio ads, billboards, Internet ads, etc.) only target new random customers, the high cost of acquiring new customers and the lack of loyalty of the new customers. Genius Referrals had the need to find new ways to acquire:

  • New customers with a higher contribution margin.
  • New customers with a higher retention rate.
  • More valuable customers in both the short and long run.

The Solution:

After researching different ways of increasing customer acquisition, the Genius Referrals team decided that a referral program is a way to go when you want to acquire new highly loyal/valuable customers at a reasonable cost. New customers acquired through a referral program are more profitable and more loyal than other customers. The average value of a referred customer is at least 16% higher than a non-referred customer with similar demographics and time of acquisition.

The Refer a Friend program:

We decided to implement a Refer a Friend program to stimulate our customers acquisition and sales.

The marketing campaign associated with the program stated the following:

  • Give 15% of the money a customer spends on Genius Referrals Platform to his referrer.
  • Give bonuses for first 90 days after the customer is been registered.

Development:

For developing the program, we first defined the requirements we needed to meet to have a successful refer-a-friend program. Then we designed the main user interfaces and finally implemented the program using our SDKs.

The Requirements:

The refer a friend program must meet the following requirements:

  • Allow advocates to refer the platform services through social networks (Facebook, Twitter, Linkedin, WhatsApp and Pinterest), email, and any other printed media (posters, fliers, business cards, etc.).
  • Allow advocate to earn bonuses through valid referrals. A bonus must be given after the referred customer completes a payment on Genius Referrals Platform.
  • Allow advocates to redeem their bonuses as cash or credit. The minimum allowed amount per redemption request is $20.
  • Allow advocates to review the analytics of his referral programs.

The design (mockups):

Before jumping into the implementation phase, we put together the following mockups to be implemented by our development team. We decided that with 5 tabs we could meet all our requirements.

Tab 1: Overview

This tab helps our customers (advocates) to get familiarized with the program and motivate them to start sharing Genius Referrals services with their friends.
Refer a friend program overview

Tab 2: Access

The advocates can register and access each of the functionalities.
Access to program

Tab 3: Share

The advocates can refer the service by sharing their share links on the social networks (Facebook, Twitter, Google +, Linkedin and Pinterest), by emailing their friends, by sharing their personal URL and by printing out their QR code on a poster, flier, business card, etc.
Program referral tools

Tab 4: Earn

Advocates can also review statistics with the amount of referrals/bonuses per network they have generated and the graphics with the referrals daily participation and the bonuses daily participation.
Referrals and Bonuses earned from the program

Tab 5: Get Paid

Advocates can redeem their bonuses as cash or credit using this tab. They will need a PayPal account if they want to redeem the bonus as cash.
Redeem your bonuses

Implementation:

Implementing and maintaining a referral program
Implementing and maintaining this refer-a-friend program looks like a lot of work, and it is if you do all the work by yourself. Thanks to the Genius Referrals Platform, you can implement and maintain a refer-a-friend program with minimum intervention and without breaking the bank. When you use our sophisticated platform, you will get all these benefits in return.
i
For implementing this refer-a-friend program using the Genius Referrals Platform, we need to follow the instructions described in the integration section. We are using AIM as our integration method because is the more flexible method you can use when integrating the referral marketing program. This means you can do almost anything using AIM; we strongly recommend using this integration method.

Setting up the new account on Genius Referrals Platform:

After finishing the registration process, (the first step on AIM) we created a new account and campaign for our Website (step 2 on AIM).
When creating the campaign we set up the type of campaign as percentage because we are given 15% of the advocate's payment to the advocate's referrer. We created one tier "1 = referrals 15%" which you can read like this:
After an advocate has generated at least one referral, give to him 15% of the payment that his referred advocates have placed in the system.
i
On the Eligibility, tab is where we specify the restrictions for the referral marketing campaign. In this particular case, the only restriction we have is the amount of days the campaign will be active. So, we set 90 days on the field Amount of days because the campaign will be active for only 3 months after the referred advocate has been signed up.

Setting up a widgets package for the campaign:

After setting up the new account and campaigns, it's time to set the widgets package to be used with the campaign.
i
Importance of widgets package
The widgets package allows us to set up the default contents we want our advocates to share on social media when sharing our services. It is very useful to create more than one widgets packages if your application has more than one language or if you need to publish a new promotional campaign for a short period. Check out more details here.
The package general information:
Because we have an internationalized website, we needed a widgets package for each language so that our advocates could share the default referral marketing content in their local language. The following widgets package is an example of the ones that we had to create in our platform (step 3 on AIM).

Notice how we've set up the Campaign to be 'Get 15% for 90 days' and the Language to be English.
The package general information

The widgets setup:

After setting up the package useful information, we set up widgets for all the networks. Here we specify what information our advocates will share on the social networks.
Defining the widgets default contents
Your marketing team is responsible for defining the contents to be published by default on the social media. Make sure they have done their research and have put together good wording with high value/quality that target the right audience. The success of your referral marketing program highly depends on this engaging contents.
i

The Facebook widget setup:

On the right side of the image below, you can see and example of the default content that will be published on Facebook after the advocate has clicked on Facebook share link. Check out below how we've set up this widget. For Facebook widget, you can also specify multiples images, the author URL and the publisher URL.
The Facebook widget set up

The Twitter widget setup:

Setting up the Twitter widget is very simple, you just need to enter the tweet you want to be published on Twitter and that's pretty much it. One thing you have to take into account is the location of the [url] tag.
Composing a tweet
The tweet is composed by tweet+url. The URL (share URL) will consume 22 characters of your tweet. You have only 118 characters, so make your words count. The [url] tag will be replaced automatically by the share URL that will be published on Twitter. If you want to change the location of the [url] tag, just move it to the proper location on your tweet. If, for some reason, you decide to remove the [url] tag from the tweet, the share URL will be added automatically at the end of the tweet.
i
Check out how we've setup our Twitter widget.
The Twitter widget set up

The LinkedIn widget setup:

The LinkedIn setup is very similar self-explanatory, we just have to set up the custom title, the summary and source. Check out below how we've set up ours.
The Linkedin widget set up

The Pinterest widget setup:

For Pinterest, we've set up the description and image URL we want our advocates to share on this particular social network. As you can set up only one image for this service we recommend you to choose wisely a good one with high value contents and high resolution.
Using Pinterest
This service is very good for sharing posters, fliers or any other media that promote your services.
i
The Pinterest widget set up

The WhatsApp widget setup:

The WhatsApp setup is very similar self-explanatory, we just have to set up the summary. Check out our setup for this widget.
The WhatsApp widget set up

Your share links and share URLs:

The main goal of setting up a widgets package is to get a list of share links that you can publish later on your referral pages and your advocates can click on to share the default widget contents (that you've set up previously) on:

  • Social media
  • Email
  • Personal message
  • Business card
  • Poster
  • Flier
After completing the widgets setup, we've finally gotten our list of share links. Notice how the system has generated a share link for each network.

The domain gr3f.co is the one we use to provide high-performance redirections between our clients, the social networks and vice-versa.
Share URLs parameters:
Parameter
Description
advocate_token
The advocate token of the customer who is sharing the link or URL.
widget_id
The widget identifier
Dealing with parameters
The advocate_token that appears in the query string needs to be replaced in your application for the proper advocate token.
i
The widgets package share links

Installing the Genius Referrals SDK:

The next step (step 4 on AIM) after finishing the setup of the widgets package is to download and install one of our SDKs in your project.

In this case, we used the Genius Referrals PHP SDK, which you can find and download here. You can find more details about the installation process here.

Registering new advocates in the Genius Referrals Platform:

Once we successfully installed the PHP SDK and tested it using these examples, we were in the condition to start sending new advocate registration requests (step 5 on AIM) to the Genius Referrals Platform.
Remember that every customer in your application represents an advocate in Genius Referrals Platform. So you have to register all your customers in Genius Referrals Platform.
i

When registering new advocates you need to send the following parameters per each advocate:

  • Account Slug: The identifier for the account
  • Name: The name of the advocate
  • Last name: The last name of the advocate
  • Email: The email of the advocate
  • Payout Threshold: This represents the number of bonuses the advocate has to generate before redeeming his bonuses.
There are two ways to get the Account Slug parameter. You can get it from your program detail page on our Admin Portal or by using the SDK method get accounts.
Find the location of your account slug
Avoiding sending personal data to Genius Referrals Platform
If for security reasons you don't want to send your customers personal information to our platform, you can send references to the name, last name and email instead. Keep in mind that you must store this references locally on your application.
i
One of the restrictions of the Genius Referrals refer a friend program is that an advocate can redeem his bonuses as cash or credit once he has generated at least $20 (Payout Threshold).
Allow advocates to redeem their bonuses as cash or credit. The minimum allowed per redemption request is $20.
The first touch point in the Genius Referrals application is the registration process. Every time a new customer completes the signup process successfully, we must create a new advocate on the Genius Referral Platform using one of our SDKs. The example below shows how to do it using the PHP SDK.
As an example, we are going to create the following advocate for the account 'Genius Referrals' that we created previously.
  • Account Slug: genius-referral
  • Name: John
  • Last name: Smith
  • Email: john@email.com
  • Payout Threshold: 20
Example using the PHP SDK:
i
Using the Javascript SDK
We have several examples of how to implement this integration with Javascript here. So check it out if Javascript is your way to go.
Also, we have two sample applications where you can see integration in action. Download this sample app here.
Updating advocate's currency
After registering and advocate you need to update the advocate's currency, otherwise the advocate will not be able to receive bonuses.
i

/*
     * On your action method just do something like this
     */
    
    // Create a new GRPHPAPIClient object 
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');

    //preparing the data to be sent on the request
    $arrAdvocate = array(
        'advocate' => array(
            "name" => "Jonh", 
            "lastname" => "Smith", 
            "email" => "jonh@email.com", 
            "payout_threshold" => 20
            )
        );
    $objResponse = $objGeniusReferralsAPIClient->postAdvocate('genius-referrals', $arrAdvocate);
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    // advocate successfully created
    if($intResponseCode == 201){
        //getting the advocate token from the Location header
        $arrLocation = $objResponse->getHeader('Location')->raw(); 
        $strLocation = $arrLocation[0];
        $arrParts = explode('/', $strLocation); 
        $strAdvocateToken = end($arrParts); 
        
        //Updating the advocate currency
        $arrParams = array('currency_code' =>  'USD'); 
        $objResponse = $objGeniusReferralsAPIClient->patchAdvocate('genius-referrals', $strAdvocateToken, $arrParams); 
        $intResponseCode1 = $objGeniusReferralsAPIClient->getResponseCode();
        if($intResponseCode1 == 204){
            //currency successfully updated
            // TODO: Save the reference between the new advocate and the customer on your local database.
            // Use the $strAdvocateToken as a reference so that you can later use the method getAdvocate(...)
            // to retrive the advocate data.
        }
        else{
            // handle errors
        } 
        
    }
    else{
        // handle errors
    }
Remember to replace the YOUR_USERNAME and YOUR_API_TOKEN with the ones generated for you.
i

Allowing our advocates to share their share links:

Once we had already registered a customer as an advocate on the Genius Referrals Platform, we needed to be able to let him share (step 6 on AIM) the contents that we've defined previously in the widgets package section. For this, we implemented a page and published the share links.

There are two ways you can use to get the share links for an advocate and publish them in your custom refer a friend page. The first method is to build your advocate's share links by yourself by taking the information from the widgets packages page, and the second is to get the share links using an SDK or our RESTful API directly. Using the SDK to get the advocate's share links is very easy; we have implemented a method you can use for this purpose. You just need to know the advocate_token, the campaign, and the widget package you want your advocates to share. Check out the reference documentation for more details.
Example using the PHP SDK:

/*
     * On your action method just do something like this
     */

    //the advocate token
    $strGRAdvocateToken  = 'cc6bdb82850654d89bebada2b52e8028922b098c1d3'; 
    
    // Create a new GRPHPAPIClient object 
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');

    $strResponse = $objGeniusReferralsAPIClient->getAdvocatesShareLinks('genius-referrals', $strGRAdovocateToken);
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 200){
        $objResponse = json_decode($strResponse);
    }
    else{
        // handle errors
    }
Once you have gotten the share links using the SDK you can parse the data and get the share URL for each network. Then build your share links according to your needs.
The advocates dashboard insights:
To implement the advocate's dashboard tab (step 7 on AIM), we used the SDK again to consume the statistics related to our advocates. You can get very useful data that you can display in the form of charts/graphics that will encourage your advocates to share more of your services and increase the odds of getting new customers. The methods you can use to get these insights are the following:

  • getBonusesSummaryPerOriginReport: gets the number of bonuses that an advocate has received per network. See an example here.
  • getReferralsSummaryPerOriginReport: gets the number of referrals that an advocate has received per network. See an example here.
Capturing new Referrals:

Once an advocate has shared a share link on one of the networks, eventually, the share link will be clicked by one of the advocate's friends. When the link is clicked, the friend will be redirected to our application and will land on the landing URL that we've specified on the widgets package setup. At this point, we need to be able to get the advocate's token, the campaign's slug, and the referral origin's slug which are part of the landing URL, and create a new referral for the advocate that has shared the link (step 8 on AIM). The parameters that are included in the URL string are:

  • gr_at: stores the advocate referrer token
  • gr_cs: stores the campaign slug
  • gr_ro: stores the referral origin slug
Here is a simple example that you can use to get the parameters.
Example using the PHP SDK:

/*
 * On your action method just do something like this
 */

$strGRAdvocateReferrerToken      = $_GET['gr_at']; 
$strGRCampaignSlug               = $_GET['gr_cs'];
$strGRReferralOriginSlug         = $_GET['gr_ro'];

$_SESSION['strGRAdvocateReferrerToken'] = $strGRAdvocateReferrerToken;
$_SESSION['strGRCampaignSlug']          = $strGRCampaignSlug;    
$_SESSION['strGRReferralOriginSlug']    = $strGRReferralOriginSlug; 
The final step is to create the connection between the new customer (a lead) and his referrer (the advocate that shared the link). This should be done after the lead has finished the sign up process because chances are that the lead will never sign up for your services. So we have to save the variables $strGRAdvocateReferrerToken, $strGRCampaignSlug and $strGRReferralOriginSlug somewhere (a session in PHP for example) and once the lead has finished the sign up process (and we have registered the advocate in the Genius Referrals Platform) we create the new referral for the referrer advocate that has shared the link. Here is the example.
Example using the PHP SDK:

/*
     * On your action method just do something like this
     */

    //loading parameter from session
    $strGRAdvocateReferrerToken  = $_SESSION['strGRAdvocateReferrerToken']; 
    $strGRCampaignSlug           = $_SESSION['strGRCampaignSlug'];
    $strGRReferralOriginSlug     = $_SESSION['strGRReferralOriginSlug'];

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');
    $arrParams = array(
        'referral' => array(
            'referred_advocate_token' => $strGRNewAdovocateToken, //the one create when the advocate was registered. 
            'referral_origin_slug'    => $strGRReferralOriginSlug,
            'campaign_slug'           => $strGRCampaignSlug, 
            'http_referer'            => $_SERVER['HTTP_REFERER']  
        )
    ); 
    $objGeniusReferralsAPIClient->postReferral('genius-referrals', $strGRAdvocateReferrerToken, $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){ 
        //if susccessfully created move on
    }
    else{
        //handle errors
    }

Giving bonuses to your advocates:

Now that we are successfully registering new advocates, allowing them to share the services on the networks and capturing and creating new referrals (connections between our advocates). We are in a position where we can start giving bonuses to the advocates after an action it's been triggered on our application (step 9 on AIM).

On Genius Referrals' refer a friend program, we give our advocates 15% of the payment that a referred advocate has placed in the system. This means that the trigger action for us is a completed payment. So, immediately after payment is completed in our platform, we try to give the bonus to the advocate's referrer. Here is an example of how you can give bonuses to your advocates.
Example using the PHP SDK:

/*
     * On your action method just do something like this
     */

    //the advocate token of the customer that has place the payment
    $strGRAdvocateToken  = 'cc6bdb82850654d89bebada2b52e80289b098c1d3'; 
    
    // Create a new GRPHPAPIClient object 
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');

    //preparing the data to be sent on the request
    $arrParams = array(
        'bonus' => array(
            'advocate_token'       => $strGRAdvocateToken, //the advocate who made the payment
            'reference'            => rand(1000000, 9999999), //A reference number, could be the payment id
            'amount_of_payments'   => 1, 
            'payment_amount'       => 100 //the payment amount placed by the referred advocate
        )
    );
    //trying to give a bonus to the advocate's referrer
    $strResponse = $objGeniusReferralsAPIClient->postBonuses('genius-referrals', $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){
        // bonus given to the advocate's referrer
    }
    else{
        // there is not need to give a bonus to the advocate's referrer
    }
Sending the right parameters
You only need to send the advocate_token and the reference as mandatory parameters. The amount_of_payment and payment_amount are optional parameters and depend on the type and restriction that you've set on your campaign
i

Allowing advocates to redeem their bonuses:

The advocates will constantly be referring your services on the networks and will be generating new referrals and bonuses very fast. You will be surprised how fast this word-of-mouth service can increase your customer acquisition. After they have generated some bonuses, they will want to get some cash back, so they need to be able to redeem their bonuses as cash, goods, or credit.

In the Genius Referrals refer a friend program, we let our customers redeem their bonuses as cash using a Paypal account or as credit that is credited to their Genius Referrals account. The only restriction the advocates have on this campaign is that they can redeem their bonuses once they have reached the $20 threshold.

To allow the advocates to redeem their bonuses (according to the design we've previously implemented), basically, we have to guarantee the following:

  1. Display the number of bonuses available that our advocates can redeem.
  2. Validate the advocate has reached the $20 threshold.
  3. Allow the advocate to add a Paypal account to redeem his bonuses as cash.
  4. Allow the advocate to make a redemption request.
  5. Display redemptions request history.
Displaying information about the bonuses is very easy, and you can quickly access it by getting the advocate using the methodgetAdvocate(...) from one of our SDKs check out here an example of the response you will get. On the response, the parameter claimed_balance represents the number of bonuses the advocate has already redeemed, the parameterunclaimed_balance represents the redeemable amount.

For allowing the advocate to add a Paypal account, we use the method postAdvocatePaymentMethod(...) to create the new payment method and the method getAdvocatePaymentMethods(...) to display the list of payment methods.
Example using the PHP SDK:

 /*
     * On your action method just do something like this
     */

    //the advocate token of the customer that wants to add a paypal account
    $strGRAdvocateToken  = '44ae47f4eda382a8f5830b78fedb7cf1de88981b0'; 

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');

    //preparing the data to be sent on the request
    $arrParams = array(
        'advocate_payment_method' => array(
            'username'       => 'john@mail.com',
            'description'    => 'Personal Paypal account', 
            'is_active'      => true
        )
    );
    //trying to create a new paypal account for the advocate
    $strResponse = $objGeniusReferralsAPIClient->postAdvocatePaymentMethod('genius-referrals', $strGRAdovocateToken, $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){
        // Paypal account successfully created
    }
    else{
        // handle errors
    } 
To allow the advocate to redeem his bonuses, we use the method postRedemptionRequest(...) that creates a new redemption request that is processed later on by one of our accounts managers in the Admin Portal. Once the request is been completed, the advocate will receive the bonuses in the form he has requested (credit, cash, or goods). The example below shows the details.
Handling the redemption requests fully on your application
You can process the redemption requests on your application by using one of our SDKs. This means that you can create and process the requests directly in your system without going to our Control Center. You can use the method patchRedemptionRequestRedemption(...) to approve and complete the redemption request.
i
Example using the PHP SDK:

 /*
     * On your action method just do something like this
     */

    //the advocate token of the customer that wants to redeem his bonuses
    $strGRAdvocateToken  = '44ae47f4eda382a8f5830b78fedb7cf1de88981b0'; 

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');
    
    //preparing the data to be sent on the request
    $arrParams = array(
        'redemption_request' => array(
            'advocate_token'            => $strGRAdovocateToken,
            'request_status_slug'       => 'requested', 
            'request_action_slug'       => 'credit',
            'currency_code'             => 'USD',
            'amount'                    => 50,
            'description'               => 'Redeeming as credit'
        )
    );
    
    //trying to create a new redemption request for the advocate
    $strResponse = $objGeniusReferralsAPIClient->postRedemptionRequest('genius-referrals', $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){
        // Redemption request successfully created
    }
    else{
        // handle errors
    } 
The parameters requests_status_slug, request_action_slug, and currency_code, are utilities that we use to create the redemption request. You can get the full list of them by using these methodsgetRedemptionRequestStatuse, getRedemptionRequestsAction, and getCurrencie with one of our SDKs.

For displaying the redemption request history, we use the method getRedemptionRequests(...) and use the filters to get only the redemption request for that specific advocate. Once we've got the data set, we display it in a table.
Example using the PHP SDK:

 /*
     * On your action method just do something like this
     */

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');
    
    $strResponse = $objGeniusReferralsAPIClient->getRedemptionRequests('genius-referrals', 1, 10, 'email::john@mail.com'); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 200){
        // request successfully processed
        $objResponse = json_decode($strResponse); 
        //TODO: display data to the user
    }
    else{
        // handle errors
    }
Above, we are getting the first 10 redemption requests for advocates with the email john@mail.com. More about this method is on our API reference documentation.

Monitoring and managing your accounts:

This is the last section of this page and explains the importance of monitoring and managing your refer-a-friend program. On our Admin Portal, you will find several tools that will help you to manage your refer-a-friend program. You can create new programs and campaigns, widget packages, advocates, bonuses, make payments, etc. Pretty much everything you can do using the SDKs and more you can do with the Control Center user interfaces.

We also display insights that can help you to analyze and improve your referral marketing programs. We have studied the most important metrics closely when it comes down to referral marketing programs and have put together the analytics that will help you to get the best out of your referral marketing program. You get all the statistics broken down by network (Facebook, Twitter, Linkedin, Pinterest, Email, PURL) so that you can pull the threads needed.

As your referral marketing program matures, is very important that you pay attention to these insights and take the proper actions if you see a decline in your customer acquisition through the referral marketing program. To keep your refer a friend program working with high performance, it must evolve constantly; sometimes, you will have to adjust the widgets package defaults contents, and other times you will have to create better campaigns to improve your customers engagement. Here are some examples of the analytics you can find on our Control Center.
Examples of some of the insights:
Refer a friend marketing program insights
LANGUAGE