//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 campaign = {keys: ["incmp"]}; //Function is embedded on the window object in a global parameter called window.AF_SMART_SCRIPT. //Onelink URL is generated var result = window.AF_SMART_SCRIPT.generateOneLinkURL({ oneLinkURL, afParameters:{ mediaSource: mediaSource, campaign: campaign, } }) 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); window.AF_SMART_SCRIPT.displayQrCode("my_qr_code_div_id"); //The size of the QR code is defined in the CSS file under #my_qr_code_div_id // #my_qr_code_div_id canvas { // height: 200px; // width: 200px; //} } document.getElementById('output_url').innerHTML = result_url;