Branch.io
Attribute mobile signups to partners
Overview
Integrating PartnerStack and Branch allows your program to track, attribute, and reward partners for signups and actions within your mobile iOS or Android application.
Before you begin...
-
Install Branch.io in your application (Branch Documentation)
-
Share your Branch Key with PartnerStack support. Do not send your Branch Secret Key.
-
Review the integration diagram below
Step 1. Create Branch 'signup' event
Create a custom event, 'signup', that is trigged when the user completes the app signup process.
The 'signup' custom event should pass the following metadata to Branch
Key | value | Required? |
---|---|---|
key | Any unique string for this user. (Example: An existing UUID, or the user's email | yes |
user's email | no** | |
name | user's name | no |
If you do not provide an email, PartnerStack will autogenerate an email using the 'key' to identify the referral in your dashboard
Please follow the proper guide to create a custom event for your platform:
Platform Specific Guides |
---|
iOS Guide |
Android Guide |
React Native Guide |
IOS example
let metadata: [String: Any] = [
// Required, and unique per user
"key": "UUID_1a2b3c",
// Optional
"name": "Darth",
"email":"[email protected]"
]
// Fire Event
Branch.getInstance().userCompletedAction(action, withState: metadata)
Step 2. Setup Branch Webhook
Get PartnerStack Branch Webhook
Go to your PartnerStack Integration Dashboard and copy the appropriate Branch webhook URL for your environment (Test vs Production).
Create Branch Webhook
Visit your Branch Webhooks Dashboard, and click "Add New Webhook".
Create a new Webhook by clicking `Add webhook.' Then,
- Paste your PartnerStack Branch webhook URL into the "Send a webhook to"
- Select "POST" as the request type
- Select "signup" as the event.
No 'signup' event?
Ensure the 'signup' event has fired to Branch at least once.
Step 3. Testing
Before submitting to the app store please test your work:
- Build your app
- Complete your signup flow
- Check the Branch 'Liveview Events Log' to ensure both the signup event, and all the metadata is being set properly.
Step 4. Follow up with PartnerStack Success
If you're not already in contact with and account manager, please send an email to [email protected]
We will guide you through the rest of the process of establishing your Partnerstack-Branch links and testing your integration.
Updated about 5 years ago