diff --git a/testbed/www/js.es6/index.js b/testbed/www/js.es6/index.js index ea801228..e016ef71 100644 --- a/testbed/www/js.es6/index.js +++ b/testbed/www/js.es6/index.js @@ -51,10 +51,10 @@ function BranchEvent() { console.log('Trigger BranchEvent()'); // event name - var event = document.getElementById('custom-action').value; + var event = document.getElementById('custom-action').value || 'blank'; // optional - var metadata = { "custom_dictionary": 123 }; + var metadata = { 'custom_dictionary': 123, 'anything': 'everything' }; Branch.userCompletedAction(event, metadata).then(function(res) { console.log(res); alert('Response: ' + JSON.stringify(res)); diff --git a/testbed/www/js/index.js b/testbed/www/js/index.js index 8d6c5f8b..929db468 100644 --- a/testbed/www/js/index.js +++ b/testbed/www/js/index.js @@ -53,10 +53,10 @@ function BranchEvent() { console.log('Trigger BranchEvent()'); // event name - var event = document.getElementById('custom-action').value; + var event = document.getElementById('custom-action').value || 'blank'; // optional - var metadata = { "custom_dictionary": 123 }; + var metadata = { 'custom_dictionary': 123, 'anything': 'everything' }; Branch.userCompletedAction(event, metadata).then(function (res) { console.log(res); alert('Response: ' + JSON.stringify(res));