Integration of Yahoo ads via a custom java script tag.
Your partner manager will create each tag for you based on what features you require.
Implementing requires three core pieces of code – ad serving code, individual ad tags and configuration code. Here’s how they work together:
<script src='https://s.yimg.com/uv/dm/scripts/syndication.js'></script>
Example of ad unit 1:
<style>#myDivAdUnit1 iframe{width:100%}</style> <div id="myDivAdUnit1"></div>
Example of ad unit 2:
<style>#myDivAdUnit2 iframe{width:100%}</style> <div id="myDivAdUnit2"></div>
Note: If you are showing multiple ad units on a page, each should have its own ad style and div.
<script type="text/javascript"> window.ypaAds.insertMultiAd({ ypaAdConfig :"000000000", ypaAdTypeTag :"MyTypeTag", ypaAdTagOptions : { SponsoredSearch : { Mobile : { SrcTag : "<your mobile source tag>" } }, ypaAdTrafficType : “test”, ypaPubParams : { query : '<your search term>' }, ypaAdSlotInfo : [ { /*where AdUnit1 ads are inserted*/ /*optional*/ /*Name of your ad unit in YPA*/ ypaAdDivId :"myDivAdUnit1", /*YourDivIdfortheadunit*/ ypaAdSlotId : "AdUnit1", /*optional*/ }, ] }); </script>
Your partner manager will work with you to determine the features you’d like, then we’ll build the tag for you to incorporate them.
ypaAdSlotInfo:{ [ ypaAdSlotId : ‘AdUnit1’, ypaAdDivId : ‘myDivAdUnit1’, ypaSlotOptions: { TemplateOptions: { DeskTop: { ImageInAds: { align: "left", size: "70x70" } }, Mobile: { ImageInAds: { align: "left", size: "70x70" } } } } ] }
Currently we have optional impression and click beaconing options. If the client would like to support the beacons, they need to supply us with end points for tracking. The end points are hard coded on the server side interface. The affid used will be relayed into the impression beacon as ‘ty’. The keyword searched will be realyed in the impression beacon as ‘q’. The remaining tracking elements that are appended to the beacon urls are defined server side by Yahoo.
The values returned in each beacon are as follows:
————————————–
The impression beacon has the following appended:
—————————————
The click beacon will have the following appended:
In addition to the basic configuration listed above, there are some additional configuration options available. Some of these are required and are marked as such, but most of them are optional.
Here is an example configuration:
window.ypaAds.insertMultiAd({ ypaPubParams:{ query:"addidasshoes", // Required if there is no keyword // parameter in the serving page's url location:"Burbank,CA" }, ypaAdTagOptions:{ SponsoredSearch:{ Mobile:{ SrcTag:"ss_src_tag_mobile" }, }, adultFilter:false,//'true' means allow, 'false' means don't clickBeacon:"click=true&serve=false", //string of key value pairs, serveBeacon:"click=false&serve=true", //which is appended to beacon URL }, ypaAdConfig:"000000005", // required. Will be provided by Inuvo. ypaAdTypeTag:"typeTag", // required. Will be provided by Inuvo. ypaAdTrafficType:"test", // "test" is the only allowed value. Exclude this // option if not testing ypaAdSlotInfo:[{ ypaAdSlotId:"north", // required ypaAdDivId:"ypaAdWrapper-MainNorth", // required ypaAdWidth:"300", ypaAdHeight:"100", ypaOnNoAd: postittoscreen, // Function to call if no ads are returned ypaSlotOptions:{ AdOptions:{ Mobile:{ AdRange:"1-2", Lat:false, Favicon:true, LocalAds:true, SiteLink:false, MerchantRating:false, ImageInAds:false }, DeskTop:{ AdRange:"1-4", Lat:false, Favicon:true, LocalAds:false, SiteLink:true, MerchantRating:true, ImageInAds:false } }, //Ad Options end TemplateOptions:{ Mobile:{ AdUnit:{ backgroundColor:"#ABABAB", borderColor:"#ABABAB", lineSpacing:15, // valid values 8-25 adSpacing:15, // valid values 5-30 font:"Verdana", urlAboveDescription:false, adLayout:1 // or 2/3, show ad in 1 line, 2 lines or 3 lines cssLink:"partnercsslocaiton.com/mycss.css" }, AdUnitLabel:{ position:"TopLeft" //"TopRight"/"BottomLeft"/"BottomRight" fontsize:8, // allowed values 6-24 color:"#123123" }, Title:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, Description:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, URL:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, LocalAds:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, MerchantRating:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, SiteLink:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, ImageInAds:{ align:"left" // or "right", size:"30x50", // widthxheight, default 20X20 formobile appendToImageSrcUrl:"a=5&b=home" } }, DeskTop:{ AdUnit:{ backgroundColor:"#ABABAB", borderColor:"#ABABAB", lineSpacing:15, // valid values 8-25) adSpacing:15, // valid values 5-30) font:"Verdana", urlAboveDescription:true, cssLink:"partnercsslocaiton.com/mycss.css" }, AdUnitLabel:{ position:"TopLeft", //"TopRight"/"BottomLeft"/"BottomRight" fontSize:8, // allowed values 6-24 color:"#123123" }, Title:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, Description:{ fontsize:14, // valid value 818 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:false } }, URL:{ fontsize:14, // valid value 8-18 color:"#ABABAB", underline:false, bold:false, onHover:{ color:"#BCBCBC", underline:true } }, ImageInAds:{ align:left, //left or right size:"50x50",//widthXheight, default 50X50 for Desktop appendToImageSrcUrl:"a=5&b=home" } } } } } }, { // This is an example of a second unit. All the options available // to the previous unit are available to this one. ypaAdSlotId:"south", ypaAdDivId:"ypaAdWrapper-MainSouth", ypaAdWidth:"300", ypaAdHeight:"100", onNoAd:postittoscreen }] });
When using the ypaOnNoAd parameter, you need to set up a JS function to handle the backfill and then specify that the function should be called by setting it in ypaOnNoAd.
EX:
ypaOnNoAd : <your callback function name> <script> function <your callback function name> ( errObj, slotInfo ) { … } </script>
When there are no ads (no coverage), YPA will call a function specified by the ypaOnNoAd ad tag parameter for the ad slot which did not have ads.
ypaOnNoAd : <Your callback function name>
Two parameters will be passed to your callback function:
1. errObj
2. slotInfo
Your callback function signature should be the following:
<script> function <your callback function name> ( errObj, slotInfo ) { … } </script>
You may specify a different callback function for each unit. If some units return ad results and some do not, then the callback function will only be called for the units for which ad results were not served.
The ypaClickTarget : “<options>” parameter specifies where the linked document will open when the link is clicked.
The value can be_parent,_blank. ( Default is _blank.)
If no target is specified, the link will open in the current context, unless the user or browser specifies otherwise.
_parent Opens the link in the parent frame.
_blank Opens the linked document in a new tab or window.
EXAMPLE:
ypaAdConfig : "000000005", ypaAdTypeTag : "typeTag", ypaAdTrafficType : "test", ypaClickTarget : “<options>”