___INFO___ { "type": "TAG", "id": "cvt_temp_public_id", "version": 1, "securityGroups": [], "displayName": "Adara Impact LP Pixel Template v5 2020", "brand": { "id": "brand_dummy", "displayName": "", "thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX8AAACECAMAAABPuNs7AAAAwFBMVEX///9lZmrNHGmHiIthY2ddXmJtbnL19fW+v8BgYWZpam7R0dLLAGFqbG9aW2BmZ2t/gIPKAF7j4+Tp6erZ2tuzs7V8fYGPj5JWV1zw8PDMD2Wio6XKAFv++vzwwtTMAGTKysyVlpn33uj01eH77/R0dXmpqavll7XeeKDnn7vPIG322uXzzt3RNnfhg6jts8rdcpzjja7XVYnqq8TTQ33ZXo/WV4jvvtLacpffdaDSLnbTP3z88vfiiKzhka3orcANFa7cAAAN00lEQVR4nO1da1viOBRGaIFCLRTKrYCAAiqCqMg6i8zu//9X29Jbcs4pTbk+O+Z15oPQNMmbc09aMxkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCYlMZv76+fl4f+1R/FSM1/bAtvXZM/PR43r9OL7ekH4Sxp96dofeMvhoNdPdBbm75rB+DJ58+rNZ/cX75DlYELkA58f9LBvy/7r7ZDvwf7c/t1ce3B+J/sP709P7fd/7bW6G/Nt/7T5bhgoxmF9znH8oHtambuu6/uYFPF8M/x87eX8O+TelATo5Vrrts+1JN5Z/yf8ZwdKddTXgfgPt/1fIf/bBbzWez1+uNuQ/Cf1POxvx/eR+FMU/Az8FmwUasvZbrRamOfv7SkP+o3DXyzIYuCnWeOHT3XsMLrJtTz98mfdMlikX4Hi82iz/5i7jGrsO2dbtKP99+Ojpem/tJ8BbP0LtyWjoaPzi+Nd9ib97Wv96ZssN/fnjKqwH3flt9N8XHuwfCJp/h/A9be78fGwg+T8aT7z9WYm0ueeslcQx+ML+Nxmvu5jV/t6nJBJC6C8YBbDfxBpt31z//C03CE4AttwwEGW0f/f2tpLbASfBoxlkV7qMJy+H7TiQ36+Fadv2wFzLisKlMH7+WCwWn7+9J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aHKoszLnbF1EMq/xPknDZy3z4IMsVD+FUSCdP2hS3RnJJwZFsq/xPnnQZVFHQP0bzz/ONHrI0vtB+EC/Jco6+WtHsU/Aqo/BLFXTP2nQpgOrniPz4UK1R9u1HS8B6DMP/OIEtyBoutvh/NPPiHpF9PPwj/cud0NqsnEn1jixPhvp2XeA82/HWTGqPxzWv5RiWd3jVc9RXXgk/BPlBfcTZvo/MJP4n9IWh/Vk8Y6YvYk/MPDPd6wIhN0Yf7X++3/qflnTjAUrBxdiPQvORP/mRrhAm4ULajfXJj/hPjn1Pzf5EYeWs0J/UxpWMg6F/+kC3BtkHUN/h+o+N/eBPsAJ+df0TyQqRMrh+fjnwhxvK5zxfrF+Seej8xmzTD/PTn/+6GpkX06H//Eoy/e/dV2voVT5PPyPyfOBUUv9rwo/4oxYgLBM/KfKRKVIK8LQi3Pyz+xL8C8oOOC/CsG/xKVc/KfsfLihd0z899fw/o/cyriUvwrqpID0zwr/5lOK+5VLghn5j/Tf2N3AGyT3f+6AP/uy2eMahEd4Dsv/27yEfdqGYBz8+8EoRs93P/94M7E5VRNiX7cfwp1/kcD5VnN59/AldvgZg5U1WH+tjlqkHvX9TZsqVL8t6PRef/953HzWtib328Fti1WVagEzriCO4U3bFP8q3Bwx/CfGT9+Z03d1Ddr8IxeN4eAT5oWRuii0Y7/YRU3D6/odqeNYbneiXt0oYMbE3t8NXRV1YtgW7hLPPDatHqrqpq/VKpaaXbxjKvEa4mm6KomvigNtg/z1df8B74gt24Vu6Oqg5ajh7WrvM9RQkJCQkJCQkJCQkJCQkJCQkJCQkJCQuJ/gP8A21gWMjdizEMAAAAASUVORK5CYII\u003d" }, "description": "Enable Adara Track clicks on 3rd part platforms.", "containerContexts": [ "WEB" ] } ___TEMPLATE_PARAMETERS___ [] ___SANDBOXED_JS_FOR_WEB_TEMPLATE___ // APIs References Established const log = require('logToConsole'); const sendPixel = require('sendPixel'); const encodeUriComponent = require('encodeUriComponent'); const getQueryParameters = require('getQueryParameters'); var adara_campaignid = getQueryParameters('adara_campaignid'); const adara_pixel = getQueryParameters('adarapixelid'); log('adara_campaingid=',adara_campaignid); if (adara_campaignid == null){ adara_campaignid = 'NA'; log('adara_campaignid is Not Found, Setting It To:', adara_campaignid); } if(adara_pixel == null){ log('adarapixelid not found in the referral url so pixel wont be fired'); }else{ log('adara_campagnid Found in Query String (Please ensure the correct value):', adara_campaignid); log('adarapixelid Found In Query String:', adara_pixel); // Creating End Point const pixel_url = 'https://tag.yieldoptimizer.com/ps/analytics?' + 'pxid='+encodeUriComponent(adara_pixel)+'&u3='+ encodeUriComponent(adara_campaignid); log('Adara pixel fired:', pixel_url); //Firinig Pixels sendPixel(pixel_url, data.gtmOnSuccess, data.gtmOnFailure); } // Call data.gtmOnSuccess when the tag is finished. data.gtmOnSuccess(); ___WEB_PERMISSIONS___ [ { "instance": { "key": { "publicId": "logging", "versionId": "1" }, "param": [ { "key": "environments", "value": { "type": 1, "string": "all" } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true }, { "instance": { "key": { "publicId": "get_url", "versionId": "1" }, "param": [ { "key": "urlParts", "value": { "type": 1, "string": "any" } }, { "key": "queriesAllowed", "value": { "type": 1, "string": "any" } } ] }, "isRequired": true }, { "instance": { "key": { "publicId": "send_pixel", "versionId": "1" }, "param": [ { "key": "allowedUrls", "value": { "type": 1, "string": "specific" } }, { "key": "urls", "value": { "type": 2, "listItem": [ { "type": 1, "string": "https://tag.yieldoptimizer.com/*" } ] } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true } ] ___TESTS___ scenarios: - name: Untitled test 1 code: |- const mockData = { // Mocked field values }; // Call runCode to run the template's code. runCode(mockData); // Verify that the tag finished successfully. assertApi('gtmOnSuccess').wasCalled(); ___NOTES___ Created on 5/27/2020, 5:41:18 PM