Branch
This Section describes how to integrate Branch with Purchasely
Integration
The integration of Branch requires 2 steps:
- Associate the user to events by providing the Purchasely SDK with the customer user id provided to the Branch SDK
- Activate the Branch integration in the Purchasely Console
Version compatibility
The minimal version of the Purchasely SDK supporting this integration is
v3.4.0
.If the Purchasely SDK integrated in your app is under the minimal version, please upgrade it.
The Branch SDK also needs to be integrated inside the app.
1. Associating users to events
To associate users, you will need to tell our SDK the User ID
that is given to Branch SDK when using their setIdentity()
method.
Here are some links to the appropriate Branch documentation : Android and iOS
Then, inform our SDK of the User ID used:
Purchasely.setAttribute(.branchUserDeveloperIdentity, value: "Actual Branch User ID")
Purchasely.setAttribute(Attribute.BRANCH_USER_DEVELOPER_IDENTITY, "Actual Branch User ID")
Purchasely.setAttribute(Attributes.BRANCH_USER_DEVELOPER_IDENTITY, "Actual Branch User ID");
2. Activating the Branch integration
Retrieve your Branch API Key from Branch's dashboard
- Follow the Branch documentation
- Write down your API Key
Retrieve your Branch API Key from Branch's dashboard
- Follow the Branch documentation
- Write down your API Secret
Enabling the Branch integration in the Purchasely Console
- Go in the "External integrations" section, and open the edition form for Branch:
![](https://files.readme.io/bf70b0d-Capture_decran_2024-07-15_a_11.54.21.png)
-
Enable the integration
-
Set your Branch API Key
-
Set your Branch API Secret
![](https://files.readme.io/327ba78-Capture_decran_2024-07-15_a_11.55.56.png)
- Enable the events you want to be sent to Branch
- (Optional) Override the names of the events that will be sent to Branch
![](https://files.readme.io/c8b9b3b-Capture_decran_2024-07-15_a_11.57.55.png)
- Save
Updated about 2 months ago