Branch

This Section describes how to integrate Branch with Purchasely

Integration

The integration of Branch requires 2 steps:

  1. Associate the user to events by providing the Purchasely SDK with the customer user id provided to the Branch SDK
  2. 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

  1. Follow the Branch documentation
  2. Write down your API Key

Retrieve your Branch API Key from Branch's dashboard

  1. Follow the Branch documentation
  2. Write down your API Secret

Enabling the Branch integration in the Purchasely Console

  1. Go in the "External integrations" section, and open the edition form for Branch:
  1. Enable the integration

  2. Set your Branch API Key

  3. Set your Branch API Secret

  1. Enable the events you want to be sent to Branch
  2. (Optional) Override the names of the events that will be sent to Branch
  1. Save

What’s Next

Learn how to integrate Airship with Purchasely