Skip to content

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

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.

  1. 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"));
    
  2. Note, that you can use placeholder [APP_INVITE_URL] to customize the position of the invite URL in inviteText property.

  3. 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

Give us your feedback! Was this article helpful?

πŸ˜€ πŸ™