Back in the ReferralHero overview, click to edit your desired Campaign.
Then the Installation tab, then Mobile App Installation.
Get your UUID: The 12-letter ID that starts with ‘MF’ in Edit Campaign > launch > Mobile app installation, e.g. MF15298bba6d.
Add the Campaign Token obtained from the campaign, and UUID from the installation Tab.
Step 4:
In the Goal section of your Campaign settings, ensure you have added the Google Play and Apple App Store links and a default referral link for desktop web users.
Well done! You should now be able to build and run your campaign. Before using the more advanced features of the SDK, you should learn about a couple of important concepts.
Tracking Referrals
Now that you have implemented the SDK, you can start identifying and tracking referrals!
For that, you will need 2 things:
Universal Link
Your Integrated App
The RH SDK Pulls information from your Device, like this:
The format for screen sizes is not native to RH, and the format should be parsed to RH accepted, such as:
With this information, you should be able to add the subscriber data, with the Get Referrer, Add Subscriber, Create Pending Referral, or Track Referral methods to automatically identify or track a referral:
To further understand the implementation of these methods, please check the Public Methods section, and our Github Sample Project.
final referralParams = {
'email': '[email protected]', // Capture this from user
'domain': 'https://a.domain.co/', // Optional value, and set as default by admin
'name': 'User Name', // Capture this from user
'referrer': 'referrerCode', // Optional value, only necessary if you want to capture the referrer code from user
'uuid': 'MFxxxxxxxxx', // Get this from RH Dashboard
'device': referralHeroService.deviceInfo.getDeviceType(), // Get device type
'ip_address': referralHeroService.deviceInfo.getIpAddress(), // Get IP address
'os_type': referralHeroService.deviceInfo.getOperatingSystem(), // Get operating system type
'screen_size': referralHeroService.deviceInfo.getDeviceScreenSize() // Get screen size
'status': 'custom_event_pending' // Use 'custom_event_pending' to set the referral status to pending
};
String transformResolution(String input) {
final dimensions = input.split('*').map((e) => e.trim()).toList();
return '${dimensions[0]} x ${dimensions[1]}';
}