Web Troubleshooting

Browser Support

  • The Branch Web SDK requires native browser Javascript and has been tested in all modern browsers with sessionStorage capability. No 3rd party libraries are needed to make use of the SDK as is it 100% native Javascript.
9, 10, 11

Bower or Npm Compatibility

  • Use bower install branch-sdk or npm install branch-sdk

CommonJS and RequireJS Compatibility

  • Add require('branch') or define(['branch'], function(branch) { ... });

Branch init Options

branch_match_idoptional - string. The current user's browser-fingerprint-id. The value of this parameter should be the same as the value of ?branch_match_id (automatically appended by Branch after a link click). _Only necessary if ?_branch_match_id is lost due to multiple redirects in your flow.
branch_view_idoptional - string. If you would like to test how Journeys render on your page before activating them, you can set the value of this parameter to the id of the view you are testing. Only necessary when testing a view related to a Journey.
no_journeysoptional - boolean. When true, prevents Journeys from appearing on current page.
disable_entry_animationoptional - boolean. When true, prevents a Journeys entry animation.
disable_exit_animationoptional - boolean. When true, prevents a Journeys exit animation.
open_appoptional - boolean. Whether to try to open the app passively through Journeys (as opposed to opening it upon user clicking); defaults to false.
nonceoptional - string. A nonce value that will be included on any script or style tags Branch adds to your site. Used to whitelist these tags in your Content Security Policy.

Testing Read Deep Link

  • Read _branch_match_id from that $fallback_url website
branch.init('key_live_YOUR_KEY_GOES_HERE', function(err, data) {
  console.log(err, data);

Journey not Sticking to Nav

  • Navigate to Dashboard Journey Page

  • Select Journey -> Edit -> Configure Views -> Banner -> Page Placement

  • 배너 스크롤 = sticky

  • 보도자료 Save & Close

  • 탐색에 다음 div를 추가하십시오.

<div class="branch-journeys-top"></div>

Create Call to Action

<a href="#" onclick="branch.deepviewCta()">deep link</a>
<button onclick="branch.deepviewCta()">deep link</button>
var linkData = {
  campaign: String(Date.now())
var linkOptions = {
  make_new_link: false, // don't create a new deep link if one already exists (e.g. _branch_match_id is in the address bar)
  open_app: true  // will attempt to open the app if install (URI Scheme deep linking only - will not work with Safari)
branch.deepview(linkData, linkOptions, function(err, data) {
  console.log(err, data);

No Access-Control Error

  • Make sure the Branch key is the same within the deep link and website
XMLHttpRequest cannot load https://api2.branch.io/v1/open. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 400.

Browser Fingerprint ID

  • In case you need to access your user's Browser Fingerprint ID for user deletion, use the function below.
branch.getBrowserFingerprintId(function(err, data) { console.log(data); });

Content Security Policy Violations

  • Generate a dynamic nonce value, and include that value as a script-src and style-src exception within your Content Security Policy
  • Pass that same value to branch.init()
branch.init(YOUR_BRANCH_KEY, {'nonce': 'GENERATED_NONCE_VALUE' });

Recommended Next Steps
이 페이지가 도움이 되었습니까?