Branch Metrics Reference
SaaSquatch integrates with Branch Metrics. This technical reference explains the specifics fields, features, API calls and functionality that is used in the integration.
New to Branch? Start Here
This page is a technical reference of the Branch integration. Just getting started for the first time? Check out this article instead:🔗 How it Works
The SaaSquatch integration with Branch Metrics works as follows:
- SaaSquatch referral links (e.g. ssqt.co/h126b21) will start redirecting to Branch links
- SaaSquatch will create branch links dynamically and set values for
data
,channel
,tags
anddesktop_url
- Branch deep link
data
will include details of the referral code, the Referrer and reward (See field reference below) - Analytics Tags will be added to help you track the performance of different platforms.
channel
: the referral medium. One ofFACEBOOK
,TWITTER
,EMAIL
,DIRECT
,REMINDER
,UNKNOWN
tags
: the source of the referral. One ofSTANDARD
,MOBILE
,UNKNOWN
By default SaaSquatch will send all link clicks through Branch, but will continue to send redirect desktop traffic to your web/desktop site you configured. This is done by
setting the Branch value for desktop_url
.
desktop_url
: the landing page you set in our portal when you created your program. If you set a desktop url for your app in Branch, it will be overwritten.
🔗 Example Deeplink
When SaaSquatch creates links dynamically in branch the resulting link, including analytics tags, redirects and custom metadata produce a deep link like the following example:
{
"code" : "BRITTANYTEST",
"$desktop_url" : "http:\/\/landingpage.com\/a\/test_a6whcgrt0vcw3\/widgets\/referral?code=BRITTANYTEST&referralMedium=DIRECT&referralSource=STANDARD",
"sq_accountId" : "55a43496ebbaff9cf86443d3",
"sq_amount" : "10",
"sq_firstName" : "Brittany",
"sq_id" : "55a43496ebbaf01cebac42cb",
"sq_imageUrl" : "http:\/\/gravatar.com\/avatar\/77af7eba41d1ccad2bf2c13704637c25?d=mm",
"sq_lastName" : "Test",
"sq_referralCode" : "BRITTANYTEST",
"sq_type" : "PCT_DISCOUNT",
"sq_unit" : "PERCENT",
"~channel" : "DIRECT",
"~tags" : ["STANDARD"],
"~creation_source" : "API",
"+is_first_session" : false,
"+clicked_branch_link" : true
}
🔗 Data Fields
When SaaSquatch creates links dynamically in branch, it includes a number of metadata fields in the data
field.
These includes fields from the User, Referral Code and Reward objects.
sq_id string | The Referrer's user ID. This allows you to look up the user in your own system. | |
---|---|---|
sq_accountId string | The Referrer's account ID. This allows you to look up group or company info. See Shared vs. Solo accounts | |
sq_firstName string | The Referrer's first name. | |
sq_lastName string | The Referrer's last name. | |
sq_imageUrl string | The Referrer's profile image URL. Note that unlike the user's | |
sq_referralCode string | The Referrer's referral code. This is necessary to attribute the referral. | |
sq_amount string | The amount of the Referred User's reward. This is sort of like the reward fields returned from the lookup referral code API call
for explaining a reward but it's different and uses a custom mapping of fields described in the table below to map from this abstract field (that's not available
in the API) to other stored or calculated fields for rewards that can be looked up directly via the API, or the fields used in
| |
sq_unit string | The unit of the Referred User's reward. For example, in a 10% off referral program this would be | |
sq_type string | The type of the Referred User's reward. One of: |