You can trigger this method to change the partner name during the current session before the next initialization. This method lets you change the partner's name instantly within the current session.
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.
The following table shows the data type for the method's parameters.
| Parameter | Data Type |
|---|---|
| newPartnerName | String |
Method Signature
window.Insider.reinitWithPartnerName(newPartnerName: string)Once you change the partner name:
- The user's events are logged separately for each panel.
- User 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 then clicks it after switching to panel B, it cannot be tracked.
- It is recommended not trigger any events for 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.