Integration
A comprehensive guide to integrating your apps with InviteReferrals. The new Ionic/Cordova Plugin helps you to run a referral campaign in InviteReferrals.
Read this guide to know the basic integration of the referral campaign, how to track the events, how to show a welcome message, and other important information via FAQs.
Add InviteReferrals Library to your Project
npm install cordova-plugin-invitereferrals
Link library to Project
ionic cordova plugin add cordova-plugin-invitereferrals --variable IR_BRAND_ID=YOUR_BRAND_ID --variable IR_ENCRYPTED_KEY=YOUR_ENCRYPTION_KEY --variable IR_URL_SCHEME=iosScheme --variable IR_DEEPLINK_HOST=www.andoridAppLink.com
Example
ionic cordova plugin add cordova-plugin-invitereferrals --variable IR_BRAND_ID=27373 --variable IR_ENCRYPTED_KEY=685B3E092414391DB6EE25A42FDBA52D --variable IR_URL_SCHEME=iosScheme --variable IR_DEEPLINK_HOST=www.andoridAppLink.com
Note:- If you add plugin correctly you will see the following in your CLI.
- ionic-cordova-plugin-inviteReferrals successfully installed *
In the above example, Dummy Brand ID and Encryption keys shown. Kindly login your IR_account to see your credentials.
Import invitereferrals package.
Now in your Ionic code, you can import the invitereferrals package.
declare var InviteReferrals: any;
Updated over 1 year ago