Customizing Smart Invites on React Native¶
To provide better user experience, you can customize Smart Invite message, an order of invite channels in Smart Invites view, Smart Link domain, and landing page. This guide shows the ways how it is possible to do.
Prerequisite¶
- Finished Getting Started with GetSocial React Native SDK guide.
- Finished Send and Receive Invites on React Native guide.
Content Customizations¶
Unfortunately not all invite channels allow the same level of customization, for instance, Twitter allows only custom message text and image, but not subject. Check the complete list of supported customizations.
To enable dynamic Smart Invite content generation GetSocial provide client side API for content customization.
-
The first step is to create
CustomInviteContent
object:const customInviteContent = new CustomInviteContent() .withText("Check this game [APP_INVITE_URL]. Itβs amazing!") .withSubject("Hey mate, look what I've found") .withMediaAttachment(MediaAttachment.withImageUrl("https://api.adorable.io/avatars/250/documentation_app.png"));
-
Note, that you can use placeholder
[APP_INVITE_URL]
to customize the position of the invite URL ininviteText
property. -
Next, send customized invitation via GetSocial Data API:
GetSocial.sendInvite('email', inviteContent, () => { console.log('Customized invitation via email was sent'); }, () => { console.log('Customized invitation via email was cancelled'); }, (error) => { console.log('Customized invitation via email failed, error: ' + error); });
Or via GetSocial UI:
GetSocialUI.createInvitesView().withCustomInviteContent(customInviteContent).show();
Invite Channels Order Customization¶
To improve organic user acquisition we recommend to adjust the order of Invite Channels according to your audience, e.g., if your app is mostly used in Asia, it makes sense to put Kik and Kakao on the top; on the other hand if your app is popular in the US - WhatsApp and Facebook Messenger provide better results.
Check how to customize the order of Invite Channels via Dashboard.
On the client side Invite Channel order property is available on InviteChannel
object:
GetSocial.getInviteChannels().then((inviteChannels) => {
inviteChannels.foreach((inviteChannel) => {
const channelId = inviteChannel.channelId;
const displayOrder = inviteChannel.displayOrder;
console.log(channelId + ', order: ' + displayOrder);
});
});
Next Steps¶
- Understand GetSocial Analytics for Smart Invites.