Skip to main content

Hello,

I am integration Branch with RC and I found this in RC documentation:

https://www.revenuecat.com/docs/integrations/attribution/branch#optional-set-a-separate-identity-in-branch-and-revenuecat

Quote:

If you prefer to keep a separate user identity between Branch and RevenueCat, set a $branchId Attribute in RevenueCat. If set, RevenueCat will use this identifier for Branch events instead of the App User Id.

 

I like that aproach and I would like to set $branchId with a user id from Branch, what how do I get it?

Could you please tell me which field I should use to set $branchId?

PS: if I don’t change/override/use any custom identity ids, so what comes from BranchSDK is not changed, I just want to pass it to RC as $branchId.

 

Thanks!

Hey ​@NickA2B!

Once you have the ID from Branch, you can set this in RevenueCat for your user with the method `setAttributes`, passing the key `$branchID` (the $ is important, denoting this as a reserved attribute for Branch) and the value. For example, depending on the SDK you’re using:

Purchases.shared.attribution.setAttributes(t"$branchId": "branch_user_id"])

Let me know if that works for you or if that’s not what you meant!


Hey ​@NickA2B!

Once you have the ID from Branch, you can set this in RevenueCat for your user with the method `setAttributes`, passing the key `$branchID` (the $ is important, denoting this as a reserved attribute for Branch) and the value. For example, depending on the SDK you’re using:

Purchases.shared.attribution.setAttributes(t"$branchId": "branch_user_id"])

Let me know if that works for you or if that’s not what you meant!

I think this might be a problem, I didn’t see that branch sends a proper “user_id” for Android.

 

Could you please verify that this code will properly connect Branch and RC:

  1. First I set Branch Identity to my device’s custom user id (deviceId)
  1. Then I set the same id to RC SDK ($branchId field).

 

This is Flutter App.

Thanks.


Reply