cordova-ionic-phonegap-branch-deep-linking-attribution
cordova-ionic-phonegap-branch-deep-linking-attribution copied to clipboard
Short URL not generated when using alias.
I am unable to generate short URLs using aliases.
The generateShortUrl() function works fine without an alias:
var analytics = {
channel: 'app',
feature: 'invite',
stage: 'new user',
};
var link_properties = {
$desktop_url: 'https://app.com/',
$android_url:
'https://play.google.com/store/apps/details?id=XXX',
$ios_url: 'itms-apps://itunes.apple.com/app/XXX',
$ipad_url: 'itms-apps://itunes.apple.com/app/XXX',
};
branch_universal_obj.generateShortUrl(analytics, link_properties).then(res => ...)
Gives me the proper URL:
https://subdomain.app.com/vEGJFJcsDS
However, when adding the alias variable to the analytics object, I get the long URL:
var analytics = {
channel: 'app',
feature: 'invite',
stage: 'new user',
alias: 'ALIAS12'
};
...
branch_universal_obj.generateShortUrl(analytics, link_properties).then(res => ...)
Gives me:
{"url":"https://app.sample.com/a/key_live_XXXXXXX?%24identity_id=123456678&alias=ALIAS12&channel=app&feature=invite&stage=new%20user&source=ios&data=....."}