Sasíček
Sasíček je bookmarklet s několika funkcemi.
Na našich službách funguje jako zobrazovátko cílení
reklam.
V prostředí SAS UI zobrazí kalkulačku pro CPT přepočet a Campaign revenue počítadlo.
Instalace v Chrome:
Klikni na tlačítko:
Vytvoř si novou záložku, nazvi jí jak chceš, do pole "Adresa URL" vlož kód ze schránky a ulož (přepiš cokoliv co tam je).
Případně můžes stáhnout samotný js kód: zde:
";if(n+=`
"}function l(e){const t=parseInt(c(e,/FLIGHT_ID=(\d+)/,1));return"number"==typeof t&&t}function c(e,t,i=2){var n=e.match(t);return n?n[i]:"undefined"}function p(e){if(B)var t=e;else t=postscribe?e:e.options.element.innerHTML;const i=parseInt(c(t,/FCID=(\d+)/,1));return"number"==typeof i?i:void 0}function u(e){if(document.getElementById(e)){var t=document.getElementById(e).innerHTML,i=[...t.matchAll("passback=1")],n=i[i.length-1];if(n){var o=p(t.substring(n.index)),a=!1;return i.length>1&&(a=!0),{multiple:a,passbackFCID:o}}return!1}}function m(e,t){if(B)var i=e;else i=postscribe?e:e.options.element.innerHTML;const n=g(i);try{if(n)return n;if(i.match("FCID=-4"))return"prazdna kreativa";if(i.match("google_ads|googletag.defineSlot"))return"PRG, google ads";if(i.match("fill_Ads"))return"PRG, fill_Ads";if(i.match("adnxs.com"))return"AppNexus";if(i.match(/(sklik|imedia)/i))return"Sklik";if(i.match("data-rp-impression-id")&&i.match("rubicon"))return document.getElementById("cpex-skin-wrapper")&&document.getElementById("cpex-skin-wrapper").getBoundingClientRect().height>100?"PRG, xApi, cpex-skin":"PRG, xApi, rubicon";if(i.match("data-rp-impression-id")&&i.match("adform"))return"PRG, xApi, adform";if(i.match("text-native")||i.match("native-feed"))return"PRG, text-native / native-feed";var o;if(i.match("ECO_X_R2B2_empty"))return(o=u(t))&&o.multiple?"R2B2 > vice passbacku > FCID:"+o.passbackFCID:o&&!o.multiple?"R2B2 passback > FCID:"+o.passbackFCID:"R2B2";if(i.match("PRG_Adform"))return(o=u(t))&&o.multiple?"PRG Adf brand > vice passbacku > FCID:"+o.passbackFCID:o&&!o.multiple?"PRG Adf brand passback > FCID:"+o.passbackFCID:"PRG Adf branding";var a=/!-- eof (.*(?=\-\-\>))/;if(!i.match(a))return"unknown";var r=i.match(a)[1],s=/\w+/;return r?r.match(s)[0]:""}catch(e){}return"nenalezeno"}function g(e){let t=/ADVID=(\d+)/;switch(advid=e.match(t),Number(advid[1])){case 3950:return"Yield; HB - R2B2";break;case 4002:return"Yield; HB - Triplelift";break;case 4e3:return"Yield; HB - Pubmatic CPEx";break;case 4078:return"Yield; HB - Pubmatic Eco";break;case 4077:return"Yield; HB - Impression Media";break;case 3999:return"Yield; HB - Xandr";break;case 4063:return"Yield; HB - Teads";break;case 4190:return"Yield; HB - Criteo";break;case 3949:return"Yield; HB - Adform";break;case 4001:return"Yield; HB - Magnite";break;case 4003:return"Yield; HB - Index Exchange";break;case 1228:return"Yield; S2S - Index Exchange";break;case 1503:return"Yield; S2S - Magnite";break;case 2919:return"Yield; S2S - Xandr";break;case 4153:return"Yield; S2S - Adform";break;case 2:return"Yield; S2S - Pubmatic";break;case 2465:return"Yield; Flight - AdManager";break;case 3372:return"Yield; Flight - Adform";break;case 130:return"Yield; Flight - AdSense";break;case 3244:return"Yield; Flight - Caroda";break;case 1906:return"Yield; Flight - R2B2";break;case 2464:return"Yield; Flight - Sklik";break;default:return!1}}function h(e){var t=Object.keys(pbjs.winningBids).find((t=>e.match(t)));return`CPM: ${pbjs.winningBids[t].cpm.toFixed(2)} ${pbjs.winningBids[t].currency}; bidder: ${pbjs.winningBids[t].bidder}`}function f(){let e={};for(group in b)for(let t in b[group].positions)("manual"!==b[group].positions[t].options.loadOn||b[group].positions[t].renderStatus)&&(e[t]=b[group].positions[t].renderStatus);return e}n.innerHTML="X",n.style.cssText="z-index: 9999; cursor: pointer; background: #4e4e4f; color: white; margin: 0; position: absolute; top: 0px; right: 0px; "+("m"===T?"padding: 15px;":"padding: 9px;"),n.id="zavrit",n.addEventListener("click",(function(){i.remove()})),i.appendChild(n),B?(i.insertAdjacentHTML("beforeend",a(x.options,"Targets")),i.insertAdjacentHTML("beforeend",r(x.options.targets)),i.insertAdjacentHTML("beforeend",o()),i.insertAdjacentHTML("beforeend",a(x.positions,"Positions"))):(E=_sashec.getGroupById().options,I=_sashec.getGroupById().options.targets,w=_sashec.getGroupById().positions,i.insertAdjacentHTML("beforeend",a(E,"Targets")),i.insertAdjacentHTML("beforeend",r(I)),i.insertAdjacentHTML("beforeend",a(w,"Positions"))),window.__sasicek={},window.__sasicek.toggleDebug=function(){let t=function(e){var t,i,n,o=document.cookie.split(";");for(t=0;t- `,B);else var o=t.activeQueue;if("vareni"===v){var a=document.getElementById("komentare"),r=!1;a&&(r=a.getBoundingClientRect().height>700);var s=Object.keys(o)[Object.keys(o).length-1];if(r){var d=Object.keys(o)[Object.keys(o).length-2];o={[d]:o[d],[s]:o[s]}}else o={[s]:o[s]}}if(B){let e=_sasic.get(["groups"]);for(let t in e){let i=e[t].positions;for(let e in i){if("manual"===i[e].options.loadOn&&!i[e].renderStatus)continue;item=i[e];var c=item.options.targets.supertag?item.options.targets.supertag.toString():item.options.size?.toString().replace(",",", "),g=m(item.code,item.elementId);n+='
- ',n+='id: '+item.elementId+"
";n+=`${g.match("Yield")?"Zdroj":"Sablona"}: ${g}
`,g.match("HB - ")&&(n+=`${h(item.code)}
`),n+=item.options.targets.supertag?"supertag: "+item.options.targets.supertag+"
":"volane size: "+c+"
",n+="pos: "+item.options.pos+"
",p(item.code)&&(n+="FCID: "+p(item.code),n+="
"),n+=' ";var f=item.elementId;if(c.match("prannotation")&&"aktualne"===v){var b=item.elementId.slice(-2);f=(f=item.elementId.substring(0,item.elementId.length-2))+"-render"+b,document.getElementById(item.elementId)&&("video"==k?(document.getElementById("reklama-prannotation").className+=" sa-show",f=item.elementId):(document.getElementById("reklama-prannotation"+b).className+=" sa-show",document.getElementById(f).className+=" sa-show"))}if(n+='",l(item.code)&&(n+=''),m(item.code,item.elementId).match("passback")){var x=document.getElementById(item.elementId).innerHTML,y=u(item.elementId).passbackFCID,w=new RegExp(y+"[/| +]FLIGHT_ID=([0-9]+)","g"),E=x.match(w),I=E?l(E.toString()):null;I&&(n+='')}n+="
",n+=" "}}}return n+="
Screenshoter
Heslo:
Debug GUI
Heslo: