> For the complete documentation index, see [llms.txt](https://docs.customerglu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.customerglu.com/miscellaneous-topics/referrals/branch.md).

# Branch

### Setting up deep link in Branch

* Sign in to your branch.io dashboard
* Enter your preferred domain name & click Next

![](https://paper-attachments.dropbox.com/s_679F188725FEA579B41AF04611AE49D582B96A96F8BAFA5E80DF2855C2E73BB2_1628677775513_image.png)

* Fill the required details about your website iOS/Android app etc. and click Next

![](https://paper-attachments.dropbox.com/s_679F188725FEA579B41AF04611AE49D582B96A96F8BAFA5E80DF2855C2E73BB2_1628677476449_image.png)

* You can now see your first deep link automatically, generated by BranchIO, click on next and it will redirect you to the dashboard

![](https://paper-attachments.dropbox.com/s_679F188725FEA579B41AF04611AE49D582B96A96F8BAFA5E80DF2855C2E73BB2_1628677852882_image.png)

* Click on the Configuration on left sidebar and scroll down to link domain section & copy the link under **Default Link Domain** & share it with CustomerGlu

![](https://paper-attachments.dropbox.com/s_679F188725FEA579B41AF04611AE49D582B96A96F8BAFA5E80DF2855C2E73BB2_1628678983832_image.png)

* Click on the Account Settings on left sidebar and under Profile tab in Branch Key and Secret section, copy the key & share it with CustomerGlu

![](https://paper-attachments.dropbox.com/s_679F188725FEA579B41AF04611AE49D582B96A96F8BAFA5E80DF2855C2E73BB2_1628679495773_image.png)

* Share following with CustomerGlu:
  * **branchKey**
  * **og\_title**: for meta/preview //optional
  * **og\_description**: for meta/preview //optional     &#x20;
  * **og\_image\_url**: for meta/preview //optional     &#x20;
  * **og\_url**: for meta/preview //optional     &#x20;
  * **desktop\_url**: Website Link     &#x20;
  * **ios\_url**: Appstore Link     &#x20;
  * **android\_url**: playStore Link

### Processing referral link from devices

\
Please refer to the following documentation for receiving and processing the referral links\
Android: <https://help.branch.io/developers-hub/docs/android-advanced-features#read-deep-link>\
iOS: <https://help.branch.io/developers-hub/docs/ios-advanced-features#read-deep-link>\
\
The referral link encodes the userId and referralCode information and the same can be extracted from the link to be passed on to CustomerGlu while registering a new user.<br>

### referredBy

Store the referrer userId information and pass it as **referredBy** property in the device registration call for the new user:

```json
{
    "userId": "<new-user-Id>",
    "deviceId": "asd",
    "deviceName": "TestDevice",
    "deviceType": "android",
    "writeKey": "write-key",
    "firebaseToken": "firebase-token",
    "referredBy": "referrerUserId"
}
```

Note: On installation where there is no referrer, you need not send referredBy property in the call

### referralCode

Store the referral code information and pass it as **referralCode** property in the device registration call for the new user:

```json
{
    "userId": "<new-user-Id>",
    "deviceId": "asd",
    "deviceName": "TestDevice",
    "deviceType": "android",
    "writeKey": "write-key",
    "firebaseToken": "firebase-token",
    "referralCode": "ABC-123"
}
```

Note: On installation where there is no referrer, you need not send referralCode property in the call
