RTBHouse DirectIntegration Implementation Guide LATAM
RTBHouse DirectIntegration Implementation Guide LATAM
RTBHouse DirectIntegration Implementation Guide LATAM
1
1
Important:
Marking and unmarking pixels must work on both HTTPS and HTTP protocols.
RTB House supports only <noscript> image retargeting pixels.
Marking and unmarking pixels must be prepared for each agreed placement.
Marking retargeting pixel must activate delivery for a particular placement.
Unmarking pixel must deactivate or pause delivery for a particular placement.
Please share all supported macros, especially if your ad server allows dynamic control
over pixel lifetime.
Example:
300x250 has two CPM thresholds 1$ and 1.20$ needs 4 pixels in total (2 marking + 2
unmarking)
If you ad server does not support audience pixels feature please refer to this Open Source
repository allowing to create a self-hosted pixels which can be used in key=value targeting
https://github.com/ppbbii/PHP-retargeting-pixels-for-DFP-key-value-targeting
Direct Integration Implementation Guide ver.1
3
USEFUL TIPS FOR MAXIMIZING RTB HOUSE SPEND
1. Please set highest possible priority in your ad server for RTB House retargeting campaign.
Unmark https://adserve.pl/retarget/pix?id=RTBhouse&cv=300x250_hi&d
=-1
Unmark https://pubads.g.doubleclick.net/activity;dc_iu=/EXAMPLE_ID
/DFPAudiencePixel;ord=1;dc_seg=EXAMPLE_SEG_BLOCK?
RTB House provides two types of delivery tags synchronous and asynchronous. Please use
version which works best according to your experience.
Direct Integration Implementation Guide ver.1
4
We strongly suggest using highest possible priority for delivery of audience based campaign.
For example: Sponsorship in DFP
Important note:
Direct Integration Implementation Guide ver.1
5
Variable eURIc must be filled with encoded url of a page where delivery takes place. If delivery is inside an
iframe please pass encoded URL to RTB House delivery tag using appropriate ad servers macro.
[EXAMPLE ONLY]:
Supported macro in publishers ad server %%ENCODED_URL%%
<!-- [PUBS CUN1aetMrfJEkmHXR8TY 300x250 async] Please DO NOT change anything in provided
tag. --><div id="CUN1aetMrfJEkmHXR8TY"></div><script>var
PubHash='CUN1aetMrfJEkmHXR8TY';wAD='300'; hAD='250'; var eURIc='%%ENCODED_URL%%'; if (eURIc
=== ''){eURIc='http://noURLerror.com';};var h=window.location.hostname;var
ord=Math.floor(Math.random() * 1e16);var
RTBhouseAD=document.createElement('iframe');RTBhouseAD.src='//storage.googleapis.com/rtbhous
e-pubs-us/delivery/pubs.html#w='+wAD+'&h='+hAD+'&publisher='+PubHash+'&url='+eURIc+'';RTBhou
seAD.width=wAD;RTBhouseAD.height=hAD;RTBhouseAD.style.border='0';RTBhouseAD.style.overflow='
hidden';RTBhouseAD.scrolling='no';document.getElementById(''+PubHash+'').appendChild(RTBhous
eAD);var
tPiX='//tracker.creativecdn.com/pubs/?hash='+PubHash+'&format='+wAD+'x'+hAD+'&host='+h+'&cb=
'+ord+'';Timps=new Image();Timps.src=tPiX;</script><!-- end of tag [PUBS
CUN1aetMrfJEkmHXR8TY 300x250 async] -->
1. Copy and paste RTB House delivery tag sent by RTB House contact
2. If you have multiple placements, please carefully use the correct one matching audience
targeting.
3. Set a test page for RTB House to verify, before the campaign is live.
Direct Integration Implementation Guide ver.1
6
Once your RTB House contact confirms test page works well, the campaign is ready to go live.
Automatic delivery report provided to RTB House contact will also be highly appreciated for
monitoring delivery health on our end.
Direct Integration Implementation Guide ver.1
7
[EXAMPLE ONLY]
<!-- Sample RTBx Script, please don't use this one as it will not work. Use the one provided
by RTB House contact -->
<script>
var RTBx=RTBx||{};RTBx={
CookieName:"rh_exampleonly",
rtgt_set:!1,GetCookie:function(a){for(var b=a+"=",c=document.cookie.split(";
"),d=0;d<c.length;d++){for(var e=c[d];"
"==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(b))return
decodeURIComponent(e.substring(b.length,e.length))}return""},rtgt:function(){if(RTBx.rtgt_se
t===!1){var
a="https://x-"+RTBx.CookieName.substring(3)+".inventorycdn.com/js?cookie="+RTBx.CookieName,b
=document.createElement("script");b.type="text/javascript",b.src=a,b.async=!0,document.getEl
ementsByTagName("head").length>0?document.getElementsByTagName("head")[0].appendChild(b):doc
ument.getElementsByTagName("body").length>0&&document.getElementsByTagName("body")[0].append
Child(b),RTBx.rtgt_set=!0}},SetRetargeting:function(){RTBx.rtgt();for(var
a=RTBx.GetCookie(RTBx.CookieName),b=a.split("|"),c=[],d=0;d<b.length;d++)c.push(b[d].split("
/")[0]);a.length>0&&googletag.cmd.push(function(){googletag.pubads().setTargeting("keylimit"
,c).addService(googletag.pubads()),googletag.enableServices()})}};try{RTBx.SetRetargeting()}
catch(a){}
</script>
<!-- ENDOF Sample RTBx Script, please don't use this one as it will not work. Use the one
provided by RTB House contact -->
Direct Integration Implementation Guide ver.1
8
Please refer to this simple source from example HTML page with integrated RTBx script
http://jsfiddle.net/RTBhouse/t20ssgtd/embedded/html/
5. On the next page, put the key in the name and select Values type as Users will select from predefined
targeting values. then click the Add values. Set values according to the instruction sent by a RTB House
contact.
*[EXAMPLE ONLY] : keylimit=CUN1aetMrfJEkmHXR8TY keylimit=hbmRiVtTdZUsBDF2Wynz,
keylimit=yWLtU9NCoD3Me1PJGK7u
Direct Integration Implementation Guide ver.1
10
6. Put the values sent by a RTB House contact, then click Apply button.
[EXAMPLE ONLY]
CUN1aetMrfJEkmHXR8TY, hbmRiVtTdZUsBDF2Wynz, yWLtU9NCoD3Me1PJGK7u,
[EXAMPLE ONLY]
keylimit=CUN1aetMrfJEkmHXR8TY, keylimit=hbmRiVtTdZUsBDF2Wynz,
keylimit=yWLtU9NCoD3Me1PJGK7u
UN1aetMrfJEkmHXR8TY:
[EXAMPLE ONLY] Synchronous version for value C
<!-- [PUBS CUN1aetMrfJEkmHXR8TY 300x250 sync] Please DO NOT change anything in provided
tag. --><script>var PubHash='CUN1aetMrfJEkmHXR8TY';wAD='300'; hAD='250';var
eURIc=encodeURIComponent(location.href); if (eURIc ===
''){eURIc='http://noURLerror.com';};var h=window.location.hostname;var
ord=Math.floor(Math.random() * 1e16);var RTBsrc='<iframe
src="//storage.googleapis.com/rtbhouse-pubs-us/delivery/pubs.html#w='+wAD+'&h='+hAD+'&pu
blisher='+PubHash+'&url='+eURIc+'" width="'+wAD+'" height="'+hAD+'" scrolling="no"
frameBorder="0"></iframe>';document.write(RTBsrc);var
tPiX='//tracker.creativecdn.com/pubs/?hash='+PubHash+'&format='+wAD+'x'+hAD+'&host='+h+'
&cb='+ord+'';Timps=new Image();Timps.src=tPiX;</script><!-- end of tag [PUBS
CUN1aetMrfJEkmHXR8TY 300x250 sync] -->
UN1aetMrfJEkmHXR8TY:
[EXAMPLE ONLY] Asynchronous version for value C
<!-- [PUBS CUN1aetMrfJEkmHXR8TY 300x250 async] Please DO NOT change anything in provided
tag. --><div id="CUN1aetMrfJEkmHXR8TY"></div><script>var
PubHash='CUN1aetMrfJEkmHXR8TY';wAD='300'; hAD='250';var
eURIc=encodeURIComponent(location.href); if (eURIc ===
''){eURIc='http://noURLerror.com';};var h=window.location.hostname;var
ord=Math.floor(Math.random() * 1e16);var
RTBhouseAD=document.createElement('iframe');RTBhouseAD.src='//storage.googleapis.com/rtbhous
e-pubs-us/delivery/pubs.html#w='+wAD+'&h='+hAD+'&publisher='+PubHash+'&url='+eURIc+'';RTBhou
seAD.width=wAD;RTBhouseAD.height=hAD;RTBhouseAD.style.border='0';RTBhouseAD.style.overflow='
hidden';RTBhouseAD.scrolling='no';document.getElementById(''+PubHash+'').appendChild(RTBhous
eAD);var
tPiX='//tracker.creativecdn.com/pubs/?hash='+PubHash+'&format='+wAD+'x'+hAD+'&host='+h+'&cb=
'+ord+'';Timps=new Image();Timps.src=tPiX;</script><!-- end of tag [PUBS
CUN1aetMrfJEkmHXR8TY 300x250 async] -->
Direct Integration Implementation Guide ver.1
12
Important note:
Variable eURIc must be filled with encoded url of a page where delivery takes place. If delivery is inside an
iframe please pass encoded URL to RTB House delivery tag using appropriate ad servers macro.
[EXAMPLE ONLY]:
Supported macro in DFP ad server %%SITE%%
<!-- [PUBS CUN1aetMrfJEkmHXR8TY 300x250 async] Please DO NOT change anything in provided
tag. --><div id="CUN1aetMrfJEkmHXR8TY"></div><script>var
PubHash='CUN1aetMrfJEkmHXR8TY';wAD='300'; hAD='250';var eURIc=' %%SITE%%'; if (eURIc ===
''){eURIc='http://noURLerror.com';};var h=window.location.hostname;var
ord=Math.floor(Math.random() * 1e16);var
RTBhouseAD=document.createElement('iframe');RTBhouseAD.src='//storage.googleapis.com/rtbhous
e-pubs-us/delivery/pubs.html#w='+wAD+'&h='+hAD+'&publisher='+PubHash+'&url='+eURIc+'';RTBhou
seAD.width=wAD;RTBhouseAD.height=hAD;RTBhouseAD.style.border='0';RTBhouseAD.style.overflow='
hidden';RTBhouseAD.scrolling='no';document.getElementById(''+PubHash+'').appendChild(RTBhous
eAD);var
tPiX='//tracker.creativecdn.com/pubs/?hash='+PubHash+'&format='+wAD+'x'+hAD+'&host='+h+'&cb=
'+ord+'';Timps=new Image();Timps.src=tPiX;</script><!-- end of tag [PUBS
CUN1aetMrfJEkmHXR8TY 300x250 async] -->
3. Fill out New order Name, Advertiser and all optional order fields if needed.
4. In New line item, fill out the Name, Inventory size and each Settings fields and select ad
units you want to deliver the RTB House Ads on.
Direct Integration Implementation Guide ver.1
14
5. In Adjust delivery options please set Frequency limits for test period during integration.
We strongly advise to use 5 impressions per 1 days at least for the first week of delivery. After
we check of discrepancies on both ends you can disable the frequency limit.
6. In Add targeting settings click Key-values from the left category, select key which you set
up at Custom targeting area before. (In this *example case keylimit) Then enter value which
corresponding selected ad units.
[EXAMPLE ONLY] keylimit=CUN1aetMrfJEkmHXR8TY.
Direct Integration Implementation Guide ver.1
15
Direct Integration Implementation Guide ver.1
16
7. Enter the name of this targeting and save it. (this will be useful while creating other line items
for values corresponding with other ad sizes)
Once your RTB House contact confirms test page works well, the campaign is ready to go live.
Automatic delivery report provided to RTB House contact will also be highly appreciated for
monitoring delivery health on our end.
Direct Integration Implementation Guide ver.1
20
C. PASSBACK DELIVERY
After weve agreed to integrate and close all business terms - CPM threshold and ad sizes:
1. RTB House contact will send you Implementation Guide.
2. Publisher sends passback delivery code to RTB House contact which will be fired when
our delivery tag is not willing to serve an impression.
3. RTB House contact will provide delivery tags with Publishers passback code
implemented.
4. Publisher sets and shares a test page for approval. This must be done prior to campaign
going live.
Most of commonly used ad servers (DFP, AppNexus, AdTech etc.) have possibility to passback
remnant inventory not used by 3p delivery tag. RTB House delivery tags are able to passback
unfilled impressions.
Please refer to your ad servers support for further instruction how to generate passback
delivery code.
If any part of your inventory is on HTTPS, the passback code must work on both HTTPS and
HTTP protocols.
We strongly advise to use this integration solution only if your ad server is working fully
asynchronously.
IF YOU USE DFP as your ad server please refer to this URL for preparing passback delivery
code:
https://support.google.com/dfp_sb/answer/1693146?hl=en
When passback delivery codes are ready for each agreed ad size please send them to your
RTB House contact.
Direct Integration Implementation Guide ver.1
21
We strongly suggest to use highest possible priority for delivery of audience based delivery for
example: Sponsorship in DFP
rtgt_set: false,
eURIc:
(encodeURIComponent(location.href)!='')?encodeURIComponent(location.href):'http://noURLerror
.com',
GetCookie: function(cname) {
var name = cname + '=';
var ca = document.cookie.split('; ');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1);
Direct Integration Implementation Guide ver.1
22
if (c.indexOf(name) == 0) {
return decodeURIComponent(c.substring(name.length, c.length));
}
}
eturn "";
r
},
rtgt: function(){
if (RTBx.rtgt_set === false) {
var rtgt_url =
'https://x-'+RTBx.CookieName.substring(3)+'.inventorycdn.com/js?cookie='+RTBx.CookieName;
var rtgt_script = document.createElement('script');
rtgt_script.type = 'text/javascript';
rtgt_script.src = rtgt_url;
rtgt_script.async = true;
if (document.getElementsByTagName("head").length > 0)
document.getElementsByTagName("head")[0].appendChild(rtgt_script);
else if (document.getElementsByTagName("body").length > 0)
document.getElementsByTagName("body")[0].appendChild(rtgt_script);
RTBx.rtgt_set = true;
}},
ord: ''+Math.floor(Math.random() * 1e16)+'',
SetRetargeting: function() {
RTBx.rtgt();
var cv = RTBx.GetCookie(RTBx.CookieName);
var Placements = cv.split('|');
var targeting = [];
for (var i = 0; i < Placements.length; i++) {
targeting.push(Placements[i].split('/')[0]); }
if (targeting.indexOf(RTBx.ph) > -1) {
// RTB House delivery tag
var RTBhouseAD=document.createElement('iframe');
RTBhouseAD.src= location.protocol +
'//storage.googleapis.com/rtbhouse-pubs-us/delivery/pubs.html#w='+RTBx.wAD+'&h='+RTBx.hAD+'&
publisher='+RTBx.ph+'&url='+RTBx.eURIc+'';
RTBhouseAD.width=RTBx.wAD;
RTBhouseAD.height=RTBx.hAD;
RTBhouseAD.style.border='0';
RTBhouseAD.style.overflow='hidden';
RTBhouseAD.scrolling='no';
document.getElementById(''+RTBx.ph+'').appendChild(RTBhouseAD);
// custom tracking
(new
Image()).src='//tracker.creativecdn.com/pubs/?hash='+RTBx.ph+'&format='+RTBx.wAD+'x'+RTBx.hA
D+'&&url='+RTBx.eURIc+'cb='+Math.floor(Math.random() * 1e16)+'';
// ENDOF - RTB House delivery taga
} else {
Direct Integration Implementation Guide ver.1
23
// custom tracking
(new
Image()).src='//tracker.creativecdn.com/passback/?hash='+RTBx.ph+'&format='+RTBx.wAD+'x'+RTB
x.hAD+'&url='+RTBx.eURIc+'&cb='+Math.floor(Math.random() * 1e16)+'';
// START PLACEHOLDER passback delivery code
googletag.pubads().definePassback('1234567890/adformat',
[[300,250]]).setClickUrl('[INSERT_CLICK_COUNTER_HERE]').display();
// ENDOF PLACEHOLDER passback delivery code
}
},
};
try{
RTBx.SetRetargeting();
} catch(err) {/*no errors*/};
</script>
1. Copy and paste RTB House delivery tag which was sent by your RTB House contact
2. If you have multiple placements, please carefully use the correct one matching audience
targeting.
3. Set a test page for RTB House to verify, before the campaign is live.
Once your RTB House contact confirms test page works well, the campaign is ready to go live.
Automatic delivery report provided to RTB House contact will also be highly appreciated for
monitoring delivery on our end.