How to create a referral campaign for a DEMIO webinar?

Why don’t you let your webinar subscribers refer their friends in exchange for a reward? That is what EarlyParrot is all about. EarlyParrot is an easy to integrate referral marketing solutions, which offers an easy to integrate API. Let’s dive into the details of how to make it work with Demio!

Click on the create campaign button.

Then follow the campaign creation wizard.  In the first step, you will be asked to give a name to your campaign and choose the language for your emails and landing pages. EarlyParrot supports English, Italian, Spanish, French and German.

In the next step, you will be asked what you would like to achieve with your campaign. Since you are integrating with Demio please choose More Sign-ups (Custom Integration).

Right after what you want to achieve you have to decide how you want to achieve it? The reward system defines the ‘rules’ of the game. EarlyParrot supports three different kinds of strategies: Reward Unlocking, Top Influencer and Fast Lane. In this example we will choose Reward Unlocking.

Next up is the setting up of the rewards. Rewards can be stacked and can be double sided. Along with each reward, you must then define the metric to use to measure whether a referrer is entitled to get a particular reward. Eg. in the following screenshot, on getting 1 referral, a referrer will be entitled to 10% off. 

Next, you can pre-populate the text to be shared on social media. This will help in making sharing on social media easier, as referrers can share your messaging and brand with a single click.

Next is perhaps one of the most important steps. Branding. EarlyParrot allows you to set:

  • the email address FROM which emails are sent from [email protected] You will not incur extra cost. We use Amazon SES to send emails and we cover all cost for sending out emails. But the FROM field will show your email, boosting open rate.
  • the content of the emails to be sent out. You can either tweak the basic emails or else use our built-in HTML editor to customise emails.
  • the styling of the Share Page and other pages which your subscribers and referrers will use to share and/or check their activity in your campaign.

The integration step is the final step. In this step, we will make EarlyParrot and Demio work together.

To set up the landing, you have to copy the provided script and paste it in the Registration Page section in Demio.

To get the landing page script on the landing page icon in EarlyParrot campaign creation wizard.

To paste the landing page script in Demio got to advanced.

and then Registration Page

It is important to copy the Demio Registration URL and paste it as your landing page in the landing page popup as shown below.

The following is a sample script to include in your Demio Registration page:

<script type="text/javascript">
var epVars = {
adminUrl : "https://admin.earlyparrot.com",
campaignId : "YOUR_CAMPAIGN_ID"
}
</script>
<script type="text/javascript" async="true" src="https://s3.amazonaws.com/earlyparrot-production-scripts/ep-landing-page.js"></script>

Once you enter the landing page URL, click on Verify Landing page and you should get the following success message.

Onto setting the Custom Database and the Share Page. In the case of Demio, once a webinar subscriber fills in the form and goes to the Thank you Page OR the Webinar Room Page, an API call is performed to subscribe the new webinar subscriber to the referral campaign. Also, the Share page is shown on the Thank you Page to enable webinar subscribers to share the webinar with their friends.

Adding the following script to the Thank you Page

<script type="text/javascript">
var epVars = {
adminUrl : "https://admin.earlyparrot.com",
appUrl : "https://app.earlyparrot.com",
campaignId : "YOUR_CAMPAIGN_ID"
}
</script>
<script async="true" type="text/javascript" src="https://s3.amazonaws.com/earlyparrot-production-scripts/ep-share-page.js"></script>

<style>
@media (min-width: 576px) {
.epWrapper {
padding-bottom: 56.25%; /* 16:9 */
}
}
@media (max-width: 577px) {
.epWrapper {
height: 900px
}
}
.epWrapper {
position: relative;
}
.epWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>

<script language="javascript">
(function(w,d,url){
var headElement=d.getElementsByTagName('head')[0];
var scriptElement=d.createElement('script');
scriptElement.addEventListener('load', function() {
var ep_subscribeObj = new Object();
ep_subscribeObj.firstName = DATA.registrant_name;
ep_subscribeObj.lastName = "";
ep_subscribeObj.email = DATA.registrant_email;
ep_subscribeObj.rh = Cookies.get('rh');
//ep_subscribeObj.sendWelcomeImmediately = 0; will not send welcome email

epJQuery.post("https://admin.earlyparrot.com/api/campaigns/YOUR_CAMPAIGN_ID/subscribe", ep_subscribeObj)
.then(function(data) {
var sharePageUrl = epVars.appUrl + '/#/iframecampaigns/' + epVars.campaignId + '/' + epVars.campaignId + '?confirm-subscribe='+data.user.confirmationToken;

var e = d.createElement('div');
e.innerHTML = '<div class="epWrapper"><iframe id="epShare" allowfullscreen frameborder="0" src="'+sharePageUrl+'"></iframe></div>';
//adding share page iframe at specific part of the page
d.getElementsByClassName("date-wrapper container")[0].appendChild(e);

});

});
scriptElement.async=1;
scriptElement.src=url
headElement.appendChild(scriptElement);
})(window,document,'https://s3.amazonaws.com/earlyparrot-production-scripts/utilities.js');
</script>

This script automatically registers the new webinar subscriber to your referral campaign. It will also the share page in the thank you page as shown below.

If you want to also register subscribers if they are taken straight to the Webinar Room, you have to add this script to Webinar Room Page

<script language="javascript">
(function(w,d,url){
var headElement=d.getElementsByTagName('head')[0];
var scriptElement=d.createElement('script');
scriptElement.addEventListener('load', function() {
var ep_subscribeObj = new Object();
ep_subscribeObj.firstName = Raven.getContext().user.name;
ep_subscribeObj.lastName = "";
ep_subscribeObj.email = Raven.getContext().user.email;
ep_subscribeObj.rh = Cookies.get('rh');
//ep_subscribeObj.sendWelcomeImmediately = 0; will not send welcome email

epJQuery.post("https://admin.earlyparrot.com/api/campaigns/5b7259149e752200207c8e3c/subscribe", ep_subscribeObj)
.then(function(data) {
//JSON object returned by subscribe call
var userFirstName = data.user.firstName;
var userLastName = data.user.lastName;
var userEmail = data.user.email;
var sharePageURL = data.sharePage;
});

});
scriptElement.async=1;
scriptElement.src=url
headElement.appendChild(scriptElement);
})(window,document,'https://s3.amazonaws.com/earlyparrot-production-scripts/utilities.js');
</script>