diff --git a/examples/google_wbraid.html b/examples/google_wbraid.html new file mode 100644 index 0000000..1a1d80c --- /dev/null +++ b/examples/google_wbraid.html @@ -0,0 +1,138 @@ + + + + + + +
+ + + //Initializing Smart Script arguments + var oneLinkURL = "https://engmntqa.onelink.me/LtRd/"; + // If a media source key is NOT FOUND on the link and NO default value is found, the script will return a null string + var mediaSource = {keys: ["inmedia"], defaultValue: "my_media_default_source"}; + var afSub4 = {keys: ["wbraid"]}; + // Google wbraid passthrough to "wbraid" outgoing parameter + var wbraid_out = {paramKey: "wbraid", keys: ["wbraid"]}; +; + //Calling the function after embedding the code will be through a global parameter + //on the window object called window.AF_SMART_SCRIPT + //Onelink URL is generated + var result = window.AF_SMART_SCRIPT.generateOneLinkURL({ + oneLinkURL, + afParameters:{ + mediaSource: mediaSource, + afSub4: afSub4, + afCustom: [ + wbraid_out + ] + } + }) + + var result_url = "No output from script" + if (result) { + result_url = result.clickURL; + document.getElementById('andrd_link').setAttribute('href', result_url); + document.getElementById('ios_link').setAttribute('href', result_url); + } + document.getElementById('output_url').innerHTML = result_url; + + +