Reinit SDK with different partner name

Prev Next

You can trigger this method to change the partner name during the current session before the next initialization. This method allows you to change the partner name within the current session instantly.

Your title goes here
This method is available on React Native 6.2.0 version or higher.
Your title goes here
The Initialize SDK method allows you to set the partner name while initializing the SDK. However, if you want to initialize the SDK with a new partner name, you should have your new partner name in local storage to be read and used in the init call of the next launch. During the init method in the next launch, ensure you read the variable from the local storage.

You may want to change the partner name for various reasons, such as a user's location or language change on the app. For example, let's say you have an app that operates in multiple countries and one Insider panel for each country you operate in. When a user changes their country on the app, you should trigger this method to log the respective data for the user for each country and to send the messages based on the user's selected country from the correct panel accordingly.

Your title goes here
To change the partner name, you should not trigger the init method, but the reinit method within the current session.

The following table displays the data type for the parameters of the method.

ParameterData Type
newPartnerNameString

Method Signature

RNInsider.reinitWithPartnerName(newPartnerName);

Once you change the partner name:

  • The events for a user are logged separately for each panel. 
  • User's attributes such as opt-in information, device token, UDID (unique device ID), and device attributes are also shared with the user profile on the other panel.
  • If a user receives a push notification from panel A and doesn't click it, but clicks the push notification after switching to panel B, this push notification cannot be tracked.
  • It is recommended to not trigger any events in 1 second upon reiniting the SDK as the reinit operation needs to be processed first. This duration might differ depending on the user's network. 
  • If the user's GDPR opt-in is false, this method cannot be executed for the respective user.